title: How to validate Date in form onblur
body: <pre><code>  function validatedate(inputText) { 
      var thsid = $(inputText).attr('id');
      var dateformat = /^(0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])[\/\-]\d{4}$/; 
    }
  </code></pre>
  
  <p>This is my common js method [incomplete] <code>onblur="validatedate(this)"</code> but its accepting invalid dates also</p>
  
  <p>I have one datepicker in my jsp as <code>textbox.onblur</code> i need to validate date using javascript</p>
  
  <blockquote>
    <p>these are the rules</p>
  </blockquote>
  
  <ol>
  <li>mm/dd/yy format</li>
  <li>mm should not exceed 31</li>
  <li>dd should not exceed 12</li>
  <li>should be commom method for all datepickers </li>
  <li>if given input invalid ..should give an alert and empty datepicker..............</li>
  </ol>