| Problem with calendar and dateStatusFunc ¶ | |
| I'm working on a page that has multiple table rows which contain 2 instances of the Calendar each. Both instances use dateStatusFunc and local functions to specify whether the date is enabled or not and sets the style of the dates that are (valid starting and ending dates for a date range). It works fine for the most part, except when you click on the enabled date, nothing happens. However, if you click on the Day header, which switches that day of the week to be the "first day" of the week (i.e. the calendar displays Sun-Sat by default, click on Friday and the calendar displays Fri-Thu), the enabled days start working. Has anyone run into this problem? ************************************************* <script language="javascript"> <script language="javascript"> /* Checks for Saturdays after 10 days from the current date */ /* Checks for Fridays after 10 days from the current date */ function ValidEnd(year,month,day) { var chkDate = new Date(year,month,day); var curDate = new Date(); | |
| Re: Problem with calendar and dateStatusFunc ¶ | |
| I've been able reproduce the issue by doing the following:
From here on, that specific instanace of the date selector works regardless if I've clicked on the day of week header. Still looking..... | |
| last |
| Problem with calendar and dateStatusFunc ¶ | |
| I'm having a problem with dateStatusFunc - I want to disable dates in the past and so my function is simply: This correctly disables all dates before today but prevents me from selecting any date, even the non-disabled ones. Strangely if I reverse the less than comparison to a greater than (return date.getTime() > today.getTime()) then all the dates in the future are disabled but I can at least select dates in the past. Might anyone tell me why this code, which seems so straightforward, has this strange side effect that you can't select even non-disabled dates? Regards, Rob | |
| last |
| Re: Problem with calendar and dateStatusFunc ¶ | |
| I was finally able to create a hack around my problem, I added to the Calendar.cellClick in calendar.js the following snippet: ... ... | |
| last |














