TrialUser
asked on
validate date field in javascript or jquery
I have a datefield . how can i make sure the date entered is valid date? please help
I already use ajaxmask, that allows only entry of numbers in the format 99/99/9999. on top of this I need to make sure this a valid date that SQL server will accept.
I already use ajaxmask, that allows only entry of numbers in the format 99/99/9999. on top of this I need to make sure this a valid date that SQL server will accept.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
your question has been answered by nap0leon correctly
just to avoid further problems, format your date before sending it to SQL by sending it as YYYYMMDD
without any date separators so you can avoid any single configuration problems between clients and servers
just to avoid further problems, format your date before sending it to SQL by sending it as YYYYMMDD
without any date separators so you can avoid any single configuration problems between clients and servers
ASKER
I tried the isNan but it is not catching :- "11/11/1111" or "99/99/9999".
However in th code when I do (DateTime.Parse("txtDate.t ext")
then I get an error. Please help.
May be is there a valid data range I can check to see if the date is in that range?
Thanks
However in th code when I do (DateTime.Parse("txtDate.t
then I get an error. Please help.
May be is there a valid data range I can check to see if the date is in that range?
Thanks
ASKER
thx
Open in new window