-
Notifications
You must be signed in to change notification settings - Fork 328
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
Allow input type to be overridden; Update date input to use type="number" #568
Conversation
This matches the existing behaviour in GOV.UK Elements [1]. As documented there, the `pattern` attribute is not valid HTML for inputs where the `type` attribute is `number`, but we add it anyway to force numeric keypads on iOS devices. [1]: https://github.com/alphagov/govuk_elements/blob/5b6dc246861dbd2e821e62d153e6eb962830e1af/app/views/examples/example_date.html [2]: http://bradfrost.com/blog/mobile/better-numerical-inputs-for-mobile-forms
I have the same concerns here as with the |
From memory, Nothing happens if a user types a non-numeric character, but I wonder if this is actually a problem in reality - it may help users catch issues quicker - and it's standard browser behavior. |
This is just aligning Frontend with what we already have in Elements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📏 (aka align)
This needs an addition to the changelog @36degrees |
These represent the changes from #568 – we accidentally omitted updating the changelog as part of that PR.
See individual commits for details.
https://trello.com/c/gpdeKWhm/695-make-date-input-component-use-typenumber