Reputation: 379
I am working on a Cordova application. Is there a way we can show a keypad on iOS devices like the image shown below
This can be achieved in Android by setting the input type='number', but in IOS it doesn't work. Need some help!
Adding input type='number' in ios shows a keypad like the image shown below
Upvotes: 2
Views: 3738
Reputation: 2626
What worked for me is decimal
in inputmode
<input type="number" inputmode="decimal"/>
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode
Upvotes: 1
Reputation: 1190
You need To specify the pattern Use like this :
<input type="number" pattern="\d*"/>
Upvotes: 3