Numeric keypad no input type="Text", ionic cordova

0

I have a field for cpf in my app, so when the user is to populate cpf, the device should show only the numeric keypad. But if I change the <input type="text"> to <input type="number"> , the numeric keypad appears, but it does not allow me to type cpf correctly, because cfp is not exactly a number.

This problem also occurs with Cep, Cnpj, Phone.

Is there any way to indicate to ionic that that input should enable the numeric keypad, other than by changing <input type> to number ?

    
asked by anonymous 04.04.2018 / 22:39

2 answers

1

guy use Jquery Mask very easy top to implement link

    
05.04.2018 / 00:06
1

The type Tel brings the numeric keypad to the mobile as the dial part.

<input type="tel">
    
04.04.2018 / 23:16