I would like to have something like this:
<input id="seconds" type="number" value="0" min="0" max="59" />
The only thing I would like to add here is to always show the numbers as 2-digit numbers at all times (showing 0 as '00', 7 as '07' and 53 as '53').
I've looked for plenty of solutions on SO, but none really does the job for me. In particular, hooking up the onChange
eventHandler or blur()
in jQuery to alter the number doesn't seem to do the job for me (I'm guessing this is because of the min-max-validation which I'm using, but I'm not sure).
In the bigger scheme, I would like make a simple and easy-to-change time control, using number inputs to easily change the hours/minutes/seconds. Isn't there any standard thing I could use ? The HTML time controls don't seem to be supported in all major browsers....