21

I have two problems in my Ionic/Cordova app, both with numeric keyboard that I not have option to show it.

1) Password input that needs to show a numeric keyboard. It's showing a alpha numerical keyboard. If I change to numeric, I can't hide the entries (with *).

2) Numeric input that I have to insert currency mask (left to right). All options that I find runs in text input.

Anybody help me? Please!

Willian Custódio
  • 616
  • 2
  • 6
  • 13

7 Answers7

21

I resolved with CSS:

<input type="number" style="-webkit-text-security:disc">

Thanks all for help!

Willian Custódio
  • 616
  • 2
  • 6
  • 13
19

I resolved with tel:

<input type="tel">
user3546879
  • 422
  • 4
  • 11
6

I am using
<ion-input type="number" pattern="\d*"></ion-input> and it is working

android keypad

Zeeshan Anjum
  • 450
  • 5
  • 21
5

2) Numeric input that I have to insert currency mask (left to right). All options that I find runs in text input.

Using http://www.numbox.org you can solve the second issue.

victor sosa
  • 899
  • 13
  • 27
5

Old but i just had this problem.

I solved it making the input:

  type="number"
  pattern="[0-9]*"

Hope it helps.

BlackBeard
  • 10,246
  • 7
  • 52
  • 62
João Mourão
  • 168
  • 1
  • 3
  • 14
2

Use pattern attribute: <input type="tel" pattern="[0-9]*">

jonhhi
  • 21
  • 1
0

Try to add this to your input, onkeypress='return event.charCode >= 48 && event.charCode <= 57'

Omar Hassan
  • 727
  • 1
  • 11
  • 24