Opening numeric keypad for text field

106 Views Asked by At

I am using Ionic framework 2.2.1. I have a text input field for which, in almost 99% case, the input value will be a number. So I would like to open a numeric keypad when a user focuses on this field. Is there any way to do this?

I have tried <input type="text" pattern="\d*"> and it's not working. I also can't use <input type="tel"> or <input type="number"> since the value can have alphabetic characters too.

1

There are 1 best solutions below

0
Marlex On

If you do this the user wouldn't be able to input alphanumeric values anymore, as the keypad only allows numbers.