Bug when select 2020-02-29
henryhui-pure opened this issue · 3 comments
henryhui-pure commented
when select 2020-02-29, it will auto changed to 2020-03-01...
AndreTaxiDigital commented
Some news?
greensopinion commented
Stepping through the code, the problem is that WheelDayPicker parses the date text without the year specified. So "Sat 29 Feb"
is parsed into a date as Sun Mar 01 00:00:00 PST 1970
.
The last day in February in 1970 is the 28th, which is why the date would roll over when parsing with 1970 as the year.
greensopinion commented
Here's my candidate fix for it: https://github.com/greensopinion/SingleDateAndTimePicker/commit/41f2ecf3098e633f04164ec6c9ef77b9a857b6fe