I just have a simple question after having searched for hours now: Is there any possibility to show the decimal keyboard in webbrowsers input fields? input type="number"
only shows numbers but i need a comma or dot instead in the bottom left corner.
I tried anything, pattern
, step
etc., but nothing brings up the decimal keyboard. I only need the numbers and a dot or comma, no A-Z or a-z or anything else.
<input type="number" id="inputNumbers" pattern="[0-9]*" size="30" min="1" max="5">
This is what i get:
This is what i want:
Here's a longer answer: on an iPhone, you enter decimals by pressing the +*# button in the lower-left corner of the keypad and pressing either * or #.
The decimal key can appear in two places on the US keyboard, in the bottom row of main keys to the right of 'M', or in an optional numeric keypad. The behavior should be the same regardless of which key is used to enter a decimal.
Checkout inputmode="decimal"
starting on iOS 12.2
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode
https://caniuse.com/#feat=input-inputmode
https://github.com/mrchandoo/cordova-plugin-decimal-keyboard
Lets you configure the decimal character(instead of .
you can change to ,
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With