Unfortunately, this is not possible in pure HTML5 to achieve this. Javascript will be required ...
<input id="hourInput" type="number" min="1" max="24" step="1" onchange="if(parseInt(this.value,10)<10)this.value='0'+this.value;" />
EDIT: Since this answer seems like a good trafic, I would like to add the fact that the approach I proposed is a naive way to do this and will only work correctly with the min attribute above -9. If the number falls below, then the value 0 will be added as a result of 0-234 when the user enters a negative value of 234.
source share