This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
What do you think the best way to handle dates are in HTLM forms? Allowing the user to type in a date, giving them a recommended format and causing an error if they type it in wrong? Have the user select from a three separate list boxes the month, day, and year? Or some other way? Thanks for the help! Brian firstname.lastname@example.org
Joined: Nov 02, 2000
Thank you maha anna, that looks very helpful. One question though, since that script allows for several different formats to be accepted, is there an easy way to convert the date string that comes in as a request parameter from the form, into a Date object? For example, if someone types 1/3/01 and another person types 01.03.2001, both are valid. Do you have to use multiple SimpleDateFormat objects and parse through them or do you have some sort of method that parses the string and tries to figure the month, day, year and consruct a Date object from that? Thanks for the help/suggestions! Brian email@example.com