Add week days to the calendar

Taflloyd - September 23, 2008 - 17:25
Project:Availability Calendars
Version:6.x-1.x-dev
Component:User interface
Category:feature request
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

This module is great!
The only problem I'm having with this module, is that I can't get days in the calendar. I want it to say "Ma Tu We Th Fr Sa Su" in the top of the calendar to show the visitor what day the dates are. Take a look on http://spjeldnes.com/kalender.html for an idea what I mean.
Would be great if you could implement something like this! Thanks.

#1

geodaniel - September 23, 2008 - 19:45

I'm all for that, I think I left it as a TODO in the code.

#2

mpp - February 28, 2009 - 21:09

Hi,

I'm working on a website for a Bed & Breakfast in the Belgian Ardennes and wanted to show the visitors an availability calendar.

As you can see on http://verteplace.be/en/guestrooms I added the weekdays

here is the code I used:

<?php
  $output
.= "<tr class='caldays'>\n";
 
$output .= "<th></th>\n";
  for (
$i=0; $i<7; $i++) {
   
$day = format_date(mktime(0, 0, 0, 1, 2+$i-$startofweek, 2000), 'custom', 'l');
   
$output .= "<th class='weekday' title='{$day}'>" . substr($day, 0, 2) . "</th>\n";
  }
 
$output .= "</tr>\n";
?>

Kind regards

#3

BleuBiRTH - April 4, 2009 - 11:44
Version:5.x-1.0» 6.x-1.x-dev

Great,

Can i use this code to implement in Drupal 6? Where do i place it?

#4

colinnc - April 13, 2009 - 02:27

Hi mpp,

Please advise on how to implement.

Thanks

#5

nicholas.alipaz - July 20, 2009 - 03:55

The title of this topic really doesn't make much sense, so I never found it... But I did this exact thing in Drupal 6. I also did a few other things too. Try the patch over here:
#520318: Add week days and use theme('table')

#6

kiamlaluno - July 24, 2009 - 20:29
Title:Get days in the calendar» Add week days to the calendar
Status:active» duplicate

I am setting this report as duplicate of #520318: Add week days and use theme('table'), which includes a patch.

 
 

Drupal is a registered trademark of Dries Buytaert.