DatePicker: Date disappears if user enters a valid date, then changes it to an invalid date
Describe the bug When using date picker with a min or max date, the date entered by a user disappears if manually entered after a valid date has been present before it.
To Reproduce Steps to reproduce the behavior:
- Go to https://next--upbeat-sinoussi-f675aa.netlify.app/api/date-pickers/#minimum_and_maximum_dates
- Click on the picker and pick any date
- Now try entering an invalid date (01/07/2020) manually
- Notice the date disappeared
Also notice that if you try just entering an invalid date (before adding one from the calendar), it does not disappear. This happens with both a date before the min date or after the max date.
Expected behavior The date does not disappear. The date will remain in the input and there will be validation to ask the user to enter a date within the range.
Additional context Example of how it's handled in another system: https://react-spectrum.adobe.com/react-spectrum/DatePicker.html#minimum-and-maximum-values