Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone Numeric Keypad with Decimal for web apps?

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!

like image 961
ARW Avatar asked Aug 27 '12 17:08

ARW


People also ask

How do I get decimals on my iPhone?

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 #.

How do I get numpad on my iPhone?

About Numpad Just tap the additional keyboards button to access Numpad.

How do you use decimals on a keyboard?

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.

How do I change the number on my keyboard iOS?

When you are typing in iOS 11, you can swipe down on the upper row of letters to add numbers.


1 Answers

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/

like image 65
Ashley Avatar answered Oct 05 '22 03:10

Ashley