title: How to disable future dates in datepicker using jquery?
body: <p>Datepicker future dates not disable. Here is my code for datepicker in HTML</p>
  
  <pre><code>&lt;div class="input-group input-append date" id="dp3" data-date="" data-date-format="mm-dd-yyyy"&gt;
      &lt;input class="form-control" style="width: 106px; height: 30px;" type="text" id="nodate" value="&lt;?php echo date('m-j-Y');?&gt;"  readonly=""/&gt;
          &lt;div class="input-group-addon add-on" style="width: 35px; height: 25px;"&gt;&lt;i class="icon-calendar"&gt;&lt;/i&gt;&lt;/div&gt;
          &amp;emsp;
          &lt;button type="button" class="btn btn-primary" onclick="window.location = '&lt;?php echo base_url().'index.php/attendance/noRecordDate/';?&gt;'+ $('#nodate').val()"&gt;Add Attendance&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here is my script:</p>
  
  <pre><code>&lt;script&gt;
      $(function() {
      $( "#nodate" ).datepicker({  maxDate: new Date() });
  });
  &lt;/script&gt;
  </code></pre>