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?

@wojtekmaj wojtekmaj force-pushed the main branch 5 times, most recently from 8182ad3 to 21af20c Compare November 7, 2022 12:58
@wojtekmaj wojtekmaj force-pushed the main branch 3 times, most recently from e1c7dc5 to a524886 Compare January 4, 2023 23:23
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from 98e1adb to e253cd3 Compare March 2, 2023 08:43
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from 0b4cd33 to 9dfdb34 Compare April 5, 2023 11:00
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from c1a58a8 to 84b1863 Compare July 21, 2023 18:59
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from 37e50fb to 5584926 Compare October 23, 2023 10:20
@wojtekmaj wojtekmaj force-pushed the main branch 2 times, most recently from 1fd7f2d to daa2c24 Compare November 2, 2023 07:30
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.

1 participant