My intention is to make this a time textbox but I can't seem to find how to do this.
- first number may max be 2
- second number may max be 3 (or 0 to 9 if the first number is 0 or 1)
- third number may max be 5
- fourth number may max be 9
So tha max value allowed is 2359. I want to add that between entering the second and third number an double point is automaticially entered.
It would format like this:
I now use this code to allow only digits. How can I check if the number entered does fullfill it's requirements?
Can someone point me in the right direction?
var e = event || evt; // for trans-browser compatibility
var charCode = e.which || e.keyCode;
if (charCode < 48 || charCode > 57 )