Link to home
Start Free TrialLog in
Avatar of rito1
rito1

asked on

HTML5 Input type Number - stop auto formatting

Hi All,

I am developing a HTML5 app for the iPad and what I am finding at the moment is that when using the input type 'number' it is auto formatting the value with a thousand separator e.g. 1000 is being forced to 1,000.

Is there any way to turn this option off other than changing the input type to 'text'? - I don't want to lose the number keyboard by default.

Many thanks,

Rit
Avatar of nap0leon
nap0leon

Good question!
Closest answer I can see is to try changing it to type=tel.
You should still get the number keyboard and not any of the formatting.
Avatar of rito1

ASKER

Yeah, I see what you mean. It's just a shame that it then becomes symantically incorrect. Also what surprises will the next version of browsers hold for the tel input type and my general number values.
ASKER CERTIFIED SOLUTION
Avatar of nap0leon
nap0leon

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rito1

ASKER

Until tonight my understanding was the the keyboard changes depending on the input type specified.

But I just found that the following forces the number keyboard to show and as the input type is text, Safari on the iPad doesn't apply the auto formatting! Voila!

<input type="text" name="myName" min="1" max="10" pattern="[0-9]*" />

Thanks for being there.

Rit