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

client side date validation in javascript

P: 1
My input text field accepts date in the format yyyymm, i want to validate the date by checking that it is not beyond today's date and it is not more than five years ago
Aug 25 '15 #1
Share this Question
Share on Google+
1 Reply


Dormilich
Expert Mod 5K+
P: 8,639
the easiest way is to use a datepicker plugin that offers those limits as settings.

otherwise, create the date objects yourself and compare them.

date in the format yyyymm, i want to validate the date by checking that it is not beyond today's date
I assume that to be a little bit tricky if there is no day part in the date.
Aug 25 '15 #2

Post your reply

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