By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,712 Members | 2,111 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,712 IT Pros & Developers. It's quick & easy.

future date not allowed

P: 21
Hi Sir,
I'm begener in Ajax or Javascript.I have problem about date validation.
I have 3 field in html page: 1->date(numeric), 2->month(text 1st 3 letter)
3->year(numeric). I wanna implement to validation through javascript. If user
enter future date then massege should be display "future date not allowed".
Please solve my problem.

Thank you.
Jul 19 '08 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
You will need to create a Date object from the input. Then compare with a newly created Date object (which defaults to today's date). See this link.
Jul 19 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.