4

I've searched through the websites that I found the following.

Using html5, we can trigger numeric keyboard with effortless like following,

<input type='tel' />
<input type='number'/>
<input type='text' pattern='some pattern' /> (This will work in IOS and not in android)

But I am using the autoNumeric plugin to format/restrict the user input if as digits. As per the documentation of autoNumeric plugin (http://www.decorplanit.com/plugin/), autoNumeric won't work if input type='tel/number' . I tried and yes it doesn't work.

  • If I go with the HTML5 and removing autoNumeric, will reflect in the way that my application won't be user friendly. To make it user friendly I need to do more code changes (It should be researched perfectly before start :-( ).
  • If I go with autoNumeric, then my application won't be user friendly in MOBILE.
  • If I go with another plugin instead of autoNumeric and that support HTML5, then I need to rework with whole project and testing time will take more cost.

Here my requirement is,

How to enable/trigger numeric keyboard in mobile/ipad/iphone without html5 ?

Or

Is there any jquery plugin to enable/trigger numeric keyboard in mobile/ipad/iphone without html5 and with autoNumeric js (autonumeric js)?

2
  • 1
    You should consider the html5 version for mobiles, and perhaps fall back to a version using your plugin for desktops. Commented Dec 4, 2014 at 12:18
  • If am right, you are saying to detect dynamically and load appropriate the input and jquery plugin. Right ? Commented Dec 4, 2014 at 12:23

2 Answers 2

5
+50

As per the documentation, Version 1.9.19 added support for <input type='tel' />

So, why not use that?

Sign up to request clarification or add additional context in comments.

4 Comments

Do they documented it ?
Hi but they've mentioned like "Type must best set to "text" to have autoNumeric function properly" :-( . check the documentation decorplanit.com/plugin
Yup, they have mentioned in the update log of that version. Its on the doc page. Scroll below and see
Yes, but I've seen like in the known issues as "Type must best set to "text" to have autoNumeric function properly"
4

Official workarounds from autoNumeric.js are

  1. <input type="text" pattern="\d*"> Currently works on iOS only
  2. <input type="tel" pattern="\d*"> Should work on most mobile browsers - on android devices you may get the pause and wait buttons.

If you need decimal digits, you may modify the pattern to [\d\.]*.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.