Calendar is starting on the wrong date
Hi,
I am using scal v0.2, and I am trying to create a calendar that starts on July 31st. However, the calendar is incorrectly starting on 1st July instead. I am initialising the calendar by passing (year, month, day) options, and today's date is 23rd June. These two facts make the following happen in the _setStartDate() function at line 100 of scal.js:
this.options.day = 31
this.options.month = 6
this.options.year = 2009
startday = new Date();
...
startday.setDate( 31 );
startday.setMonth( 6 );
startday.setYear( 2009 );
However, since this is June, the step "startday.setDate( 31 )" tries to create an intermediate date of "June 31st", which does not exist and so is rolled to "July 1st".
I suggest that maybe startday should be initialised in the following order instead:
startday.setFullYear( 2009 );
startday.setMonth( 6 );
startday.setDate( 31 );
Post new comment