I have been using the following script to call two connected
calendars:
checkinCal = new Calendar({
        inDateCal: {
                checkin_date: 'd',
                checkin_month: 'm',
                textdatein: 'm/d/Y'
        },
        outDateCal: {
                checkout_date: 'd',
                checkout_month: 'm',
                textdateout: 'm/d/Y'
        }
}, { direction: .5, pad: 1 });

When I open the first calendar using the input replacement method and
select a date in the future, then open the second calendar, the first
calendar's invalid days, i.e. those dates for the current month that
are in the past, are applied to the current calendar, even if the
month is in the future.
This can cause serious problems if the current date is in the later
part of the month, e.g. if the current date is the 29th or 30th, since
almost all the dates of the second calendar will appear invalid, even
if the month being auto-loaded when the calendar is opened is in the
future.

Well, anyway, after nosing around in the code, I found a solution:
At line 485 the following assignment occurs:
var valid = cal.days;

If, at this point, this line is inserted:
$extend(cal, this.values(cal));

The second calendar will have it's dates updated.

Hopefully this will help someone else in the future who has the same
problem.

Thanks,
 Shafiq.

Reply via email to