0

hi all, i would like to ask,
if i have a time field in an application form.
i want it in 24 hours format without the (am/pm).
how can i modify my html5 time type below?

<label>Time:-FROM</label><input type="time" name="timefrom">
4
Contributors
4
Replies
36
Views
3 Years
Discussion Span
Last Post by oriclon
0

if the users type am pm for the time input, modify the field with javascript, altering 3:20pm to 15:20 onblur,

two select lists, 0-23 0-59, with labels indicating 24 hour time is required

the form handler is ideally parsing the text to a timestamp anyway, so str2time in the form handler

whole range of possibilities

Edited by almostbob

1

Hey, I actually read the manual.d0a3386f5ecbbc93511837582c199967

wondered why I never had a bleep fill in a form wrong,
/test.php?timefrom=00%3A59
is the tail of the get parameter submitted as 12:59am
the 12 hour ampm selector parses in the user agent to ISO 8601 standard representation

W3C reference problem solved: data will be submitted in 24hour time

That gets an elephant stamp :

Edited by almostbob

Votes + Comments
Nice one! Nice elephant aha ;P
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.