Date validation using javascript?
<p>In Javascript I am trying to write the validation for a date, where the user has to select a future date and not a past date. My code seems to work only when I use a date from last month (e.g. <code>26/11/2011</code>). This is my script: </p>

<pre><code>&lt;script type="text/javascript" &gt;
   function mydate()
   {           
       var d= new Date ();
       var day= d.getDate ();

       var mon=d.getMonth ();

       var year= d.getFullYear ();

       var dateformat= day+"/"+mon+"/"+year ;

       var get= document.getElementById("txt").value; 

       if(get &gt;= dateformat )
       {
          alert ('yes valid');
       }
       else 
       {
            alert('Date should greater than to date ');
       }
   }
&lt;/script&gt; 
</code></pre>
