Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
49
rated 0 times [  52] [ 3]  / answers: 1 / hits: 46990  / 15 Years ago, mon, july 20, 2009, 12:00:00

I'm having trouble finding an elegant way to allow for date/time input in an html form. I am thinking of having drop down menus for year, month, day, hour, minute, second, millisecond that are populated with valid entries only. I could do this by hard coding values for each drop down menu, but I'm thinking there must be a more elegant way to do this, perhaps with some already existing javascript library that I have not found yet. Any tips for getting this done?



edit: Second, and if possible, millisecond precision is needed for what I'm working on.



edit#2: After reading some of the comments, I have come to the realization that it is probably a bad idea to have drop down menus for the large range of values required by hours/minutes/seconds and especially milliseconds. I think will go with having the DatePicker prototype date chooser, along with a simple textfield for time input.


More From » html

 Answers
62

This can be done quite elegantly with a Jquery plug-in called Datepicker


[#99092] Wednesday, July 15, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jennie

Total Points: 593
Total Questions: 102
Total Answers: 106

Location: Federated States of Micronesia
Member since Fri, Sep 16, 2022
2 Years ago
jennie questions
;