react-date-picker
react-date-picker copied to clipboard
Handle leading zeros and improve UX with default input fields
New proposal, using normal input field, instead of type=number.
Advantages:
- no need for additional span to handle leading zeros, while supporting all major browsers
- update on ArrowUp/ArrowDown easily handled at parent level ('DateInput`), allowing for infinite date sequences (ie. 12-31-2018 -> focus on day 31 -> ArrowUp -> 01-01-2019)
- validation on
minDate/maxDatealso handled inDateInput, which simplifies the logic ofDayInput, MonthInputandYearInput` quite a bit
What do you think?