I know with native iPhone apps you can use UIKeyboardTypeDecimalPad to force a numeric keypad with a decimal. Is there any way to force this same keypad for an input field on a mobile webpage or web application? If not yet, does anyone know if this detection will be added to Safari in iOS 6?
I am able to display the regular numeric keypad without issues, but I'd really like to have the decimal key so I don't need to display the full keyboard.
Thanks!
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 #.
About Numpad Just tap the additional keyboards button to access Numpad.
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.
When you are typing in iOS 11, you can swipe down on the upper row of letters to add numbers.
This is not possible, however there is a slight hack, which you can use.
Look at this link - http://web.archive.org/web/20151110014447/http://www.brownphp.com/2011/05/iphone-currency-input-web-apps/
Once the user starts writing/typing in the field it starts adding the numbers this way - 0.01 -> 0.12 -> 1.23 -> 12.34 . So this can be used for similar effect.
Also here is a overview of the input types for web apps, where you can see it is not possible to use the input type with numbers and a decimal point.
http://www.fabianpimminger.com/web-development/how-to-change-the-iphone-on-screen-keyboard-in-web-apps/
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