react-datepicker
react-datepicker copied to clipboard
minDate < year CE 1000 does not work
Describe the bug
minDate property is not respected if earlier than the year 1000 when typing dates into the DatePicker
input field.
To Reproduce
- Set
minDate
property onDatePicker
to a value earlier than CE1000, e.g.Date(693, 0, 0, 0, 0, 0, 0)
- Try to input a date by typing a value before the start of year CE1000, e.g. April 19 750.
- DatePicker
onChange
handler does not fire.
Expected behavior
If the DatePicker
is configured with a minDate earlier than the year CE1000, it should allow the user to input a date greater than minDate
, even if that is earlier than CE1000.
Additional context Full report of the apparent underlying issue (hardcoded minDate of 1/1/1000) is here: https://github.com/Hacker0x01/react-datepicker/issues/2834
When clicking through on the calendar, dates earlier than CE1000 can be selected.
Version react-datepicker 4.7.0