Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle leading zeros and improve UX with default input fields #116

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

marcoancona
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant