bootstrap-year-calendar icon indicating copy to clipboard operation
bootstrap-year-calendar copied to clipboard

Wrong month displayed, shifted by 1?

Open nostartbutrings opened this issue 5 years ago • 1 comments

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

nostartbutrings avatar Aug 07 '18 20:08 nostartbutrings

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

William-H-M avatar Aug 08 '18 12:08 William-H-M