uvarov-frontend / vanilla-calendar-pro

The Vanilla Calendar Pro is a versatile JavaScript date and time picker component with TypeScript support, making it compatible with any JavaScript frameworks and libraries. It is designed to be lightweight, easy to use, and feature-rich, without relying on external dependencies.
https://vanilla-calendar.pro
MIT License
461 stars 58 forks source link

Bug in clickMonth action #317

Closed abdousami02 closed 2 hours ago

abdousami02 commented 2 hours ago

Screenshot from 2024-11-02 13-07-31 when add function clickMonth() in 'actions' options, the self.selectedMonth value is not the real month number. Jan Month is -> 0 Dec Month is-> 11

uvarov-frontend commented 2 hours ago

Please read the information above the sandbox.

It's important to note that months are numbered starting from zero, where January corresponds to the zeroth month, and December is the eleventh.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getMonth