
June 15th, 2004, 11:36 AM
|
|
Registered User
|
|
Join Date: Aug 1999
Posts: 16
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Date Validator/fixer
Alright you helped me with the time validator and the time fixer. Now I need to do the same thing with the date. Is there a easy way to do this? I know one text field is not the way to go, but it is the way everyone decided they wanted it.
Here's my psuedo code:
1. user enters a date in a text field (one text field) in the format of 1-01-04, 1/01/04, 1/1/2004, etc.
2. Javascript makes sure it's a valid date
3. If it's a valid date: javascript makes sure it's in mm-dd-yyyy format (no /'s).
3a. If it's not in that format.. it puts it in that format.
4. If it's not a valid date, it says, hey this ain't a valid date..
I got the validator, so it checks to make sure it's actually a date. I need help with the turn it into that format peice.
|