Link to home
Start Free TrialLog in
Avatar of gizmoadria
gizmoadria

asked on

12/24 hour clock: validation in a form field. ASP/Javascript

We would like for people to pick a time based on a drop down.

Here is an example

7:00am
7:30am
8:00am

and then when the form is submitted, keep it that way.  I need the code for this.

We are using ASP/Javascript
Avatar of archrajan
archrajan

>>and then when the form is submitted, keep it that way.  I need the code for this.


do u mean when the form is submitted it shud be converted??
Avatar of gizmoadria

ASKER

When the form goes through, it should stay in that format of 00:00AM or 00:00PM.  I wanted to state that just in case!
ASKER CERTIFIED SOLUTION
Avatar of archrajan
archrajan

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
It's working great!

One last thing, how do I specify a default start time?   like 8:00am?
<select name = "time">
<option value = "8:00am" selected>8:00am</option>
<option value = "7:00am">7:00am</option>
<option value = "7:30am">7:30am</option>
<option value = "8:30am">8:30am</option>
</select>