florent37/SingleDateAndTimePicker

Bug when select 2020-02-29

henryhui-pure opened this issue · 3 comments

when select 2020-02-29, it will auto changed to 2020-03-01...

Some news?

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.