react-datepicker icon indicating copy to clipboard operation
react-datepicker copied to clipboard

minDate < year CE 1000 does not work

Open stephent opened this issue 2 years ago • 3 comments

Describe the bug minDate property is not respected if earlier than the year 1000 when typing dates into the DatePicker input field.

To Reproduce

  1. Set minDate property on DatePicker to a value earlier than CE1000, e.g. Date(693, 0, 0, 0, 0, 0, 0)
  2. Try to input a date by typing a value before the start of year CE1000, e.g. April 19 750.
  3. 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

stephent avatar Mar 28 '22 22:03 stephent