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
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It's working great!
One last thing, how do I specify a default start time? like 8:00am?
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>
<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>
do u mean when the form is submitted it shud be converted??