input type="number" does not work properly
See original GitHub issueHi @changhuixu
First of all thanks for the good work. The lib is pretty good and has a lot of edge case validations.
But why are all the samples using input type="text"
which technically sounds wrong because we are expecting a number input.
Our input controls needs a spinner
which can be controlled by arrow keys on the keyboard. But when we add digitOnly
to the input type="number"
there are two problems arise
- Arrow keys to control to increase / decrease the values does not work
- Also when i try to manually enter the
max
value it does not allow me to enter.
Please find the reproducible link here for this bug 🐛 - CodeSandbox
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
input type number in html 5 is not working? - Stack Overflow
This is how you use the input type number in HTML5: <input type="number" name="cost">. Here is a working example of the input type...
Read more ><input type="number"> - HTML: HyperText Markup Language
<input> elements of type number are used to let the user enter a number. They include built-in validation to reject non-numerical entries.
Read more >Why the number input is the worst input - Stack Overflow Blog
If you are building a form that requires conditional validations or calculations, it is hard to understate just how big of a problem...
Read more >You probably don't need input type=“number” - CSS-Tricks
Brad Frost wrote about a recent experience with a website that used <input type="number"> :
Read more >input[type='number'] value isn't updated · Issue #13651 - GitHub
Assuming I'm thinking about this correctly, it looks like the issue is that the value attribute is reporting as "01" when it should...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you @sashatrn I will update the readme.
Hi @gethari , you are right. The
input type="number"
won’t work. This library is intended to be used intext
input.