I have a date picker but i m trying the manual entry from user i-e September has 30 days how can i block 31st date to be manually entered from the user ???
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You shouldn’t get in the way when the user types something.
Instead you should do is: Let the user enter any value, validate it (that will fail), make the field red, add an error message above the form (“date is invalid”), set focus on the field.
Add a click handler to the submit button and make sure that all fields are valid. If one isn’t, abort the submit (
return false;). Otherwisereturn true;to submit the form.