title: Javascript date validation
body: <p>I have two text fields </p>
  
  <pre><code>&lt;input type="text" name="fromdate" &gt; (YYYY-MM-DD)
  
  &lt;input type="text" name="todate" &gt; (YYYY-MM-DD)
  </code></pre>
  
  <p>Both fromdate and todate have datefields .</p>
  
  <p>Dateformat is  (YYYY-MM-DD)</p>
  
  <p>Among these need to validate todate textfield , date should be greater than fromdate
  EX: if fromdate is 2011-11-24 todate should be greater than fromdate ,todate may 25,26 etc..,need to validate todate textfield  in javascript</p>