0

I have an input field as follows:

<input type="Date" id="datepicker">

Now I want to validate this field such that the user can't select a date after the system's date and also can't select a date before a date specified.

For example, if today's date is, 01-Oct-2015, then the user can't select any date after 01-Oct-2015 and also he/she can't select any date before, let's say, 02-Jan-2013.

How to do this using JavaScript?

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.