Recent Topics

Calendar Customization

Started by on Jul 14, 2004 – Contents updated: Jul 14, 2004

Jul 14, 2004 19:01    


i would like to customize a little the Calendar, but it's not easy since most part is hard coded.

- First, b2e Calendar has both month and years switch, this is great.
the trouble is that the switching links are not next to month and year text, they are gone in a footer.

What would be cool and ergonomic friendlier is on a first line, the links to previous and next month and in-between, the month.
Same for the year on a second line.

example :

< July >
<< 2004 >>
Mon Tue Wed Thu Fri Sat Sun

- Now this is a bit too large, I tried to reduce with


$this->headerdisplay = 'e';

(in _class_calendar.php)
but I still get the "3 letters day", what's wrong ?

Jul 16, 2004 14:03

interesting suggestions. We'll try to implement these someday.

Jul 16, 2004 18:35

Glad to hear that.

Now about haderdisplay :
in, _calendar.php
there's a line with


$Calendar->set( 'headerdisplay', 1 );  // set this to 0 if you don't want to display "Mon Tue Wed..."

Regarding to what says the comment, only two values are possible : 0 or 1
So I looked at _class_calendar.php to change the day length from 3 to 1 letter
(Fri > F).
Thus I replaced 'D' by 'e'


$this->headerdisplay = 'e';   // D => 'Fri'; e => 'F', l (lowercase l) => 'Friday'

But that sets the default and doesn't change the final appearance.

conclusion, to change the week days length we must edit


$Calendar->set( 'headerdisplay', 1 );  // set this to 0 if you don't want to display "Mon Tue Wed..."

and replaced the 1 by 'D', 'l' or 'e'.

Aug 08, 2004 03:28

Hey I just discovered that the week/days calendar can turn into year/months.
I love it !

Form is loading...

multiblog – This forum is powered by b2evolution CMS, a complete engine for your website.