It seems that some of my website users are having trouble trying to insert values into the input fields of a type number with the step attribute set.
I am using Django 1.6 to render forms in HTML.
The number of fields is displayed in the base field of the DecimalField model with max_digits = 25 and decimal_places = 5
This leads to the following html example displayed for a number field:
<input type="number" value="" step="0.00001" name="quantity" id="id_quantity">
The step attribute that I know is not yet supported in FireFox, but is in Opera, Chrome, Safari, and IE10 +
Everything works fine in all browsers except IE10 and IE11. In the above example, the maximum range that can be entered is from -227 to 227 in IE10 and IE11. If I try to enter a lower or larger value (respectively) than this, I get a "You must enter a valid value" message and cannot submit the form.
According to http://www.w3schools.com/tags/att_input_step.asp
The step attribute indicates the legal number intervals for the item.
Example: if step = "3", valid numbers can be -3, 0, 3, 6, etc.
So, in my user example, they tried to enter 20,000 as a value that failed in IE10 and IE11. If my calculations are correct, 20,000 correctly falls within the interval of 0.00001
The solution for me may be to remove the step attribute from all of my forms that use the number field, either through django forms or using javascript, but I think it will be a very dirty solution, and the other is against HTML5 grain.
Has anyone else encountered a similar problem, have I done something wrong or is this a bug in IE10 and IE11?
Any thoughts, comments or answers are welcome. At the same time, I will be forced to provide my usual solution for affected users, offering to use a browser that works.