'How can I allow users to enter "." in an iOS numeric keyboard with <input>?
I have read this post:
https://css-tricks.com/finger-friendly-numerical-inputs-with-inputmode/
It says I can use the following code to allow users to enter numbers with a number-only virtual keyboard, which is quite convenient than the traditional virtual keyboard:
<label for="creditcard">credit card number:</label> <input pattern="[0-9]*" type="text" name="creditcard">
However, there is no way to enter dot here. For instance, if I want to enter 5.6 or 6.0, I got stuck there.
Is there any way I can do this?
Solution 1:[1]
replace
<input type="number" inputmode='numeric"/>
by
<input type="number" inputmode='decimal'/>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | AGamePlayer |

