title: How to disable the future dates in datepicker using angularjs and jquery
body: <p>Hi I need to disable the future dates, I have tried in all the ways
  but I'm unable please let me know where I'm wrong.</p>
  
  <pre><code>&lt;div class="input-group date"&gt;
       &lt;input type="text" class="form-control pull-right" id="datepicker2" placeholder="Date of Join" ng-model="DateofJoining"&gt;
       &lt;div class="input-group-addon"&gt;&lt;/div&gt;
  &lt;/div&gt;
  
  $('#datepicker2').datepicker({
      autoclose: true,
      maxDate: new Date()
  });
  </code></pre>
  
  <p>I have even tried in angularjs also but wasn't able to disable them, please let me know how to disable the future dates.</p>
  
  <p>I'm using  <strong>bootstrap-datepicker.js</strong> for creating the datepicker.</p>