Re[3]: Not selectable dates
2006/04/20 16:42
Viewed 65765 times
Replies: 1/2

Hi! I used a similar function to leave only an open window or range of dates... but now I have a strange behavior...
The first time I call the calendar if I have some days disabled, when I click in the ones I want it doesn't happen anything (no javascript errors either) until I change month or something like that, but not onclik... if I put an alert on the first line of the the selected function nothing happens so it's not beeing called....

Where is the code which calls the selected??

Thanks!

Re[4]: Not selectable dates (Solved)
2006/11/27 23:05
Viewed 58057 times
Replies: 1/1

After some step-by-step debugging, I think I may have found the bug that caused this issue.

Look in calendar.js and look at line 595 (at least it was for me) and look where it says...

var other_month = !(cal.dateClicked = !el.otherMonth);
if (!other_month && !cal.currentDateEl){

And change it to...

var other_month = (cal.dateClicked = !el.otherMonth);

By removing the ! at !(cal.dateClicked...); I was able to have it work correctly for me, and everything else still works correctly.

Now, I make no claim to know why this works. All I did was trace where the function fell apart at & noticed the exclamation point and removed it to see what would happen.

I have only tested this in the case where I had a flat calendar, no multiple dates, and had special dates with the rest disabled. Results may be different if you have a different setup.

Perhaps when I have more time I will see about disecting it some more and see if I can find out exactly why it does this.

last
Re[5]: Not selectable dates (Solved)
2007/05/16 21:50
Viewed 49594 times
Replies: 0/0
by Dave

This topic should be sticky. Great fix! I was pulling my hair out with this one!

last
Google