Paul-DS / bootstrap-year-calendar

[DEPRECATED] A fully customizable year calendar widget, for boostrap !
Apache License 2.0
294 stars 243 forks source link

Wrong month displayed, shifted by 1? #220

Open nostartbutrings opened 5 years ago

nostartbutrings commented 5 years ago

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

William-H-M commented 5 years ago

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