Click to See Complete Forum and Search --> : Date Validation thru Java Script
clyde
02-12-2004, 09:28 AM
Does anybody know a really slick way to validate a 8 digit date.
mo da cy yr
Format being- 02 14 20 04
Any help would be appreciated.
Thanks
Clyde
Vladdy
02-12-2004, 09:30 AM
After you change format to something more conventional....
if(isNaN((new Date(dateString)).valueOf()))
return false;
clyde
02-12-2004, 01:58 PM
Vladdy
Thanks for your response
The script that you posted will check for valid numeric, but it will not flag 06312004 as an invalid date, am I correct.
I guess maybe I am looking for to much. I need to do full date validation.
Any suggestions
Thanks
Clyde
olerag
02-12-2004, 02:20 PM
You can check-out this thread (http://forums.webdeveloper.com/showthread.php?threadid=26410&highlight=date) to see if it meets your requirments.
Note that the format for this script is MM/DD/YYYY so you'd
need to combine your CY/YY fields into one. I believe the
RegExp uses either "/" or "-" delimiters between fields.
clyde
02-19-2004, 01:16 PM
Thanks for the reply