bootstrap-year-calendar
bootstrap-year-calendar copied to clipboard
Wrong month displayed, shifted by 1?
Hi,
if I install the sample with the included datasource, all events are shifted by one month. This sample event:
id: 5,
name: 'Chrome Developer Summit',
location: 'Mountain View, CA',
startDate: new Date(currentYear, 10, 17),
endDate: new Date(currentYear, 10, 18)
is displayed in November and not in October!? Is there a solution?
Best regards, Lex
Hi,
all events are shifted by one month
Not really all is working fine, just that you're using it wrong.
JavaScript months are 0 indexed, so 0 = January and so on, being December = 11