title: How to set max date in Datepicker Angular JS?
body: <p>I tried like as:</p>
  
  <p><strong>JS code:</strong></p>
  
  <pre><code> var today = new Date();
   var dd = today.getDate();
   var mm = today.getMonth()+6;
   var yyyy = today.getFullYear();
  
   $scope.maxDate = yyyy + '-' + mm + '-' + dd;
  </code></pre>
  
  <p><strong>HTML code:</strong></p>
  
  <pre><code>&lt;input type="text" ng-click="open($event)" min-date="minDate" max-mode="maxDate" datepicker-options="dateOptions" class="form-control" datepicker-popup="{{format}}" ng-model="dtModel"/&gt;
  </code></pre>