Reinier
Member
Posts: 10
Registered: 11/3/2003
Location: The Netherlands
Member Is Offline
|
| posted on 11/3/2003 at 01:33 PM |
|
|
Problem with current day highlight
I've recently installed the calendar and it works fine (after some minor tweaks...).
But there is one thing I don't understand: today it's November 3rd. When I click the next-month button, December 3d is highlighted. That is
NOT today and therefore it shouldn't be highlighted. Actually, in each month today's day is highlighted as if it is the current day.
Is there something wrong with my install or is it a known bug?
I suppose I could fix it myself but I'd like to konw if you already have a fix for this small problem.
Thanks in advance!
|
|
|
Reinier
Member
Posts: 10
Registered: 11/3/2003
Location: The Netherlands
Member Is Offline
|
| posted on 11/3/2003 at 02:03 PM |
|
|
I already fixed it (changed some code in calendar.php), but I'd still want to know if it was a bug or not :)
|
|
|
wildcare
Junior Member
Posts: 4
Registered: 11/1/2003
Location: Tasmania, Australia
Member Is Offline
|
| posted on 11/4/2003 at 09:06 AM |
|
|
Any chance of sharing the change/code with us?
|
|
|
Reinier
Member
Posts: 10
Registered: 11/3/2003
Location: The Netherlands
Member Is Offline
|
| posted on 11/4/2003 at 11:53 AM |
|
|
I don't know if the SoftComplex people like it when people change their php-code (calendar.php actually says please, do not change anything
below this line)...
But anyway, it is pretty simple:
Below $cm = get_date('m');
I added the following: $cy = get_date('Y');
And I changed this line:
$class=$d==$day?($m==$cm?'cur':'cur'):(!(($j+1)%7&&$j%7)?'we'
:($d<=0||$d>$num?'bodyh':'body'));
Into this one:
$class=$d==$day&&$m==$cm&&$y==$cy?('cur'):(!(($j+1)%7&&$j%7)?'we':($d<=0||$d>$num?'bodyh':
'body'));
It does not change the class of the <SPAN> element in the cell!
Check it out @ http://fiat127club.nl (including more tweaks and fixes, e.g. proper ISO-8601
week numbers)
|
|
|
wildcare
Junior Member
Posts: 4
Registered: 11/1/2003
Location: Tasmania, Australia
Member Is Offline
|
| posted on 11/5/2003 at 10:18 AM |
|
|
Many thanks - I will add that to my list of "must do" tasks
|
|
|