In HTML you can add the step
attribute to inputs of type number. I wanted this because I liked how it can simplify the input for the user, by only pressing the up/down key.
I found out that an additional feature of this attribute is, that it forces the user to stay in that interval. HTML does this with validation. You can enter any value manually, but it won't let you submit the form. I don't want this!
To work around with this, I found that there is a novalidate
attribute that is used in the <form>
tag, which works great. But sadly, the browser support is poor.
I guess I'd need to remove the step
attribute and write the functionality by myself with JavaScript/jQuery by triggering the keydown event on it.