Reputation: 117
I have a text box which can take both metric and imperial unit system. The problem is that for me to enable that, the input type of textbox has to be changed from number to text.
The previous box was -
<input id="thickness" type="number" value="10" min="2" max="100" step="1" />
The current box is -
<input id="thickness" type="text" value="10" min="2" max="100" step="1" />
HTML5 does not support spinner in text type. Is there any other work around to support native HTML5 spinner in text type without adding external support from JS?
Upvotes: 2
Views: 2449
Reputation: 876
No, HTML5 even if it has a lot of components good for doing your work is just a frontend,so if you need to change something that the user does not need to see, you have to go with JS (or Jquery), you can replace the DOM of your input with Jquery.
Upvotes: 1