I have seen many ways to validate these dates, but I don’t actually know which is the best way to validating the two text boxes.
Once I click on my submit button, the onsubmit = check() will check the dates if they are correct or not.
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.
The best way to handle validation in Javascript is with regular expressions. Check out examples here
If you need to manipulate the date, i.e. if you want to convert it through code then you need to split the string up using the Split function and then combine it in the correct order again. Check out example here.