Link to home
Start Free TrialLog in
Avatar of running32
running32

asked on

Mask Edit box in asp.net

I have a text box and need the user to enter in a time.  Is there a way to make a text box only allow a certain formate.  I need the date to be entered with the : in it.  An example is 9:58.  How can I check it is a number and that they enter in :.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of daniel_balla
daniel_balla

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kaliyugkaarjun
kaliyugkaarjun

just a quick correction, better use the expression  ^\d{1,2}\:\d{1,2}$  as this will allow single digits too.

Cheers