Javascript isMysqlDate() function for form validation


I'm building a form that contains a text field for a date. This date needs to be entered in mysql format "yyyy-mm-dd". I'm looking for a function that will validate the text box date and return true if the date is valid and false if it isn't. Surprisingly after about 15 minutes of googling I can't seem to find anything that quite fits the bill.

Please could someone tell me how to write this function.

thanks very much
Who is Participating?

Improve company productivity with a Business Account.Sign Up

erikTsomikConnect With a Mentor System Architect, CF programmer Commented:
check this out . I think it will give you what you need
xoundboyAuthor Commented:
Sorry for the delay - my wife just had a baby so I'm off work for a few days
xoundboyAuthor Commented:
thanks - I got it working now.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.