title: Javascript Date validation for mm/dd/yyyy format in asp.net
body: <p>I want to validate BirthDate, which should be in "mm/dd/yyyy" format, on the client side.</p>
  
  <p>I have tried it as following, but it is not working properly:</p>
  
  <pre><code>$("#btnUpdateEditCB3").click(function(event) {
      var txtBirthDate = $('#&lt;%= txtBirthDateCB3.ClientID %&gt;').val();
      var txtNickName = $('#&lt;%= txtNickNameCB3.ClientID %&gt;').val();
      if (txtBirthDate != "") {
          if (txtBirthDate.match(/^(?:(0[1-9]1[012])[\/.](0[1-9][12][0-9]3[01])[\/.](1920)[0-9]{2})$/)) {
              alert("Please enter date in mm/dd/yyyy format");
              $('#&lt;%= txtBirthDateCB3.ClientID %&gt;').focus();
              return false;
          }
      }
  });
  </code></pre>