-
Notifications
You must be signed in to change notification settings - Fork 272
how to set keyboard type to decimal pad? #74
Comments
|
I ran into a case where I couldn't use
Still really wish there was a way to programmatically set the keyboard type. |
I've had good luck forcing the field to type="tel" and combining it with ui input masks for numeric and decimal / money entry across both Android and iOS keyboards. Entirely hacky, but it seems to work. pattern="\d*" will show you the right thing on iOS, unless you need the decimal point present. |
number and tel will not work. keyboard.show() will open default text keyboard. |
Actually tel does work for me, exactly as described above. |
if you used numpad somewhere in the app before then yes. |
type="tel" works for me as well, but having it create a ton of input verifications and bad UX experience (in my opinion), and not finding a plugin that achieves the production level I was aiming for (nor in the UX or customisation aspect), I've created a new one currently used in our live mobile app. The number picker / spinner is implemented as an attribute directive, so stick to any DOM element, or your existing input fields (just remember to set their css to read only) and voila, solve a bunch of headaches (input verifications, user churn, etc.) The directive acts as you'd expect it, with drag capability as in native devices, with a slick look, highly customizable and plenty additional functionality. Check it out! |
I faced with same issue and made my own plugin |
Hi mnill, awesome! it seems your plugin does not support android, is this planned to be added in the future? |
I am not sure yet, is android has troubles with decimal keyboards too? |
Depends on your definition of problem. if only solving existing keyboard problem and not substituting completely then I guess it is not relevant for now...thanks |
There are other simples and customizable plugins on the store like https://market.ionic.io/plugins/ion-digit-keyboard. |
Hi mnill, Can you please explain a little bit how can I use this plugin in my cordova app ? I am trying with your example but I am not getting the desired output. I need a keyboard with 0-9 and decimal. So i was trying 9 option. But I am getting the default keyboard with numbers and chars. Thanks. |
@codedaemon12 try minimum worked example from mnill/cordova-custom-keyboard#1 |
Hi llya, Thanks for this..this worked for me. I have never done coding in obj c . Do Thanks,
|
Guys i have written a plugin https://github.com/mrchandoo/cordova-plugin-decimal-keyboard , i need iOS experts to review and also others to use it and let me know |
Mrchandoo your plugin doesn't work with ionic. |
Hi! How I can solve? regards |
I found this, and worked for me. |
Don't know why but if I use an <ion-input type="number" pattern="\\d*"> The generated standard input then is like this: <input type="number" pattern="\d*"> Would be nice to have an info about that in http://ionicframework.com/docs/api/components/input/Input/, or maybe it's a bug? |
Thanks guys, |
Guys Simple,
|
Is it possible to do that?
The text was updated successfully, but these errors were encountered: