2 ms·
Spinning can be prevented (by attaching event handlers), and the spinner buttons can be hidden. The disadvantage of the proposed solution is the lack of (autom
by tgv 5y ago
Spinning can be prevented (by attaching event handlers), and the spinner buttons can be hidden.
The disadvantage of the proposed solution is the lack of (automatic) feedback. Browsers tell you when the a number input exceeds the min/max range, in the browser's default language. If you want to validate a text input field and tell the user the number is too low or too high, you'll need to provide your own translated text.
- ezfe 5y agoYes...but that has a flipside: "Credit card number must be less than 9999999999999999" is completely useless, and you can't customize that.
- tgv 5y agoI'm not saying that you should use a number input for credit cards. That's an identifier that happens to consists of digits, not a number. But for things like age, or number of items?