Timeline Examples - new Date displays a month out?

hi

i am experimenting with using the scheduler timeline examples provided in the download package…

could someone possibly explain why the following line of code in the examples for the current displayed date seems to be a month behind?

for example: dhtmlxScheduler_v30_111025/samples/06_timeline/07_pdf.html

line 72: scheduler.init(‘scheduler_here’,new Date(2009,5,30),“timeline”);

displays a date of 2009,6,30 not 2009,5,30

many thanks!

elliot

Hello,

That’s the way Date object works in JavaScript.
new Date(2012,0,1) - 01 January 2012
new Date(2012,1,1) - 01 February 2012
So months start from 0, dates from 1.

Kind regards,
Ilya