Pregunta

I'm using html to tell Safari to use the iPhone's number keyboard inside my hybrid app. As I want to add decimal numbers, this is close, but not quite good enough for the purpose of its use. Does anyone know how easy/hard to is to add a decimal point to this keyboard? Is it possible through Javascript or an equivalent? Or is this specifically a native fix? Any thoughts are welcomed. See the link below for an example of what I'm trying to achieve.

http://www.kalekold.net/index.php?post=15

Thank you!

¿Fue útil?

Solución

this is not possible, however there is a slight hack, which you can use.

Look at this link - 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/

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top