Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Problem with current day highlight
Reinier
Member

Posts: 10
Registered: 11/3/2003
Location: The Netherlands
Member Is Offline
posted on 11/3/2003 at 01:33 PM Reply With Quote
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!
View User's Profile View All Posts By User U2U Member
Reinier
Member

Posts: 10
Registered: 11/3/2003
Location: The Netherlands
Member Is Offline
posted on 11/3/2003 at 02:03 PM Reply With Quote

I already fixed it (changed some code in calendar.php), but I'd still want to know if it was a bug or not :)
View User's Profile View All Posts By User U2U Member
wildcare
Junior Member

Posts: 4
Registered: 11/1/2003
Location: Tasmania, Australia
Member Is Offline
posted on 11/4/2003 at 09:06 AM Reply With Quote

Any chance of sharing the change/code with us?
View User's Profile View All Posts By User U2U Member
Reinier
Member

Posts: 10
Registered: 11/3/2003
Location: The Netherlands
Member Is Offline
posted on 11/4/2003 at 11:53 AM Reply With Quote

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)
View User's Profile View All Posts By User U2U Member
wildcare
Junior Member

Posts: 4
Registered: 11/1/2003
Location: Tasmania, Australia
Member Is Offline
posted on 11/5/2003 at 10:18 AM Reply With Quote

Many thanks - I will add that to my list of "must do" tasks
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Free/Trial Script Download Free Download
Product Documentation Documentation
Documentation page
Change Log
Support Forum Support Forum
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004