Javascript for validating date in textbox


Description: This script validates a date field to ensure it's in the format mm/dd/yyyy.It also intelligently checks that the date ranges are valid, so something like 02/30/2005 is caught.I believe life is short, and it is for loving, sharing, learning and connecting. Is there a way to stop people filling in date fields manually?You may done validation for "dd/mm/yyyy" format but today I need to do validation for "MM/YYYY" format.


It is very important to validate the data supplied by user through a form, before you process it. In the following examples a Java Script function is used to check a valid date format against a regular expression.Among various kind of data validation, validation of date is one. Later we take each part of the string supplied by user (i.e.


  1. Pingback:

  2. eric   •  

    Lucky for the pigs however, the sailors never returned.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>