Page 1 of 1

constraint on time

Posted: Fri Apr 09, 2004 1:22 am
by bugthefixer
i hav a form where i want to enter time...my time field looks like this
00:00
and code for this is
<input name="arr_time" type="text" value="00:00" size="5" maxlength="5" >

now i want to make like it this so that ':' remains there and when user enter two numbers then it jumps directly to the values after ':', secondaly how can i apply costraints over it so tat user cannot enter hours over 24 and seconds over 60...

Posted: Fri Apr 09, 2004 3:48 pm
by twigletmac
To make it easier, separate the hours and minutes into two separate text fields, then it is easy to validate the numbers entered and you can recombine them any way you like.

Mac