Numeric keyboard input type="Text", Ionic Cordova

Asked

Viewed 1,268 times

0

I have in my app a field for Cpf, I need to make sure that when the user fills Cpf, the device shows only the numeric keyboard. But if I change the <input type="text"> for <input type="number">, the number pad appears, but does not allow me to type Cpf correctly, because cfp is not exactly a number.

This problem also occurs with Zip Code, Cnpj, Telephone.

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

  • face use Jquery Mask very top easy to implement https://igorescobar.github.io/jQuery-Mask-Plugin/

1 answer

1

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

<input type="tel">

Browser other questions tagged

You are not signed in. Login or sign up in order to post.