Home forums Report Bugs Date displaying 1 month Reply To: Date displaying 1 month

#20442

Vishwas R
Keymaster

@faulduff,

In JavaScript, date object can be created in 4 ways. new Date(), new Date(year, month, day, hours, minutes, seconds, milliseconds), new Date(milliseconds), new Date(date string). In your case i.e new Date(year, month, day), month counts from 0 to 11 i.e. 0 corresponds to January and 11 corresponds to December. Changing the month according to JavaScript date-object should work fine in your case. For different JavaScript date formats please refer this link.


Vishwas R
Team CanvasJS