Search code examples
htmlinternet-explorerinputinternet-explorer-10

Why does HTML5 input of type number not work or works sporadically in IE10


I'm trying to get decimals to work in a input field of type number. To implement this I'm trying to modify the step attribute.

 <input name="aNumberInput" type="number" min="10000" max="400000" step=".001"  id="with-step"/>

I've found the implementation in IE10 doesn't work, the validation is completely sporadic. For example, use the following jsFiddle and try inputting 11111.232, then try 11111.222. For some reason the .232 validates but the .222 does not.

http://jsfiddle.net/4PQn9/


Solution

  • When testing this .. does this happen in

    Browser Mode: IE10

    Document Mode: Standards

    ???

    IE10 does support the input number type but it does not show increment / decrement buttons.

    http://msdn.microsoft.com/en-us/library/ie/hh773064%28v=vs.85%29.aspx

    check browser support:

    http://caniuse.com/#feat=input-number

    list of supported input types in IE:

    http://msdn.microsoft.com/en-us/library/ie/ms534700%28v=vs.85%29.aspx

    UPDATE

    looks like this was also asked here:

    HTML Number Input removes decimal point?

    Force decimal point instead of comma in HTML5 number input (client-side)

    http://blog.isotoma.com/2012/03/html5-input-typenumber-and-decimalsfloats-in-chrome/