react-date-picker icon indicating copy to clipboard operation
react-date-picker copied to clipboard

Handle leading zeros and improve UX with default input fields

Open marcoancona opened this issue 7 years ago • 0 comments

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/maxDate also handled in DateInput, which simplifies the logic of DayInput, MonthInputandYearInput` quite a bit

What do you think?

marcoancona avatar Nov 05 '18 12:11 marcoancona