nggepe / calendar-gc

A jquery calendar library
https://nggepe.github.io/calendar-gc/
MIT License
23 stars 7 forks source link

All date handling should disregard time and day of month #12

Open FRvanderVeen opened 1 year ago

FRvanderVeen commented 1 year ago

The pickedDate property on gcObject is initialized as new Date(). When I then call setDate( new Date()) this will always cause an animation to happen since pickedDate != newDate. I think you should remove all time info and also the current day of month from all dates. You're only interested in the year and month. I think you could help yourself if you make a method for that. Either inside the gcObject of as a function on Date. For the latter I found some js library that does something like that: https://github.com/datejs/Datejs/blob/master/src/core.js