title: Angular UI Datepicker programmatically set to open to a particular month
body: <p>Is there a way to the calendar open up to a particular month WITHOUT actually setting the value for the datepicker. </p>
  
  <p>As an example, I have two datepickers, one is a start date and one is an end date. As seen in the fiddle here: <a href="http://jsfiddle.net/leopardy/ao4nnd7d/" rel="nofollow">http://jsfiddle.net/leopardy/ao4nnd7d/</a></p>
  
  <p>If the user selected a day for the Start calendar, like May 12, 2016 for example, then I would like the End calendar to open up to May when the user opens up the calendar. However, I do not want to force any particular date on them so I do not want the actual value of the calendar to be set. The user can choose to navigate to another month if they did not want May. It is just an initial starting point.</p>
  
  <p>Is there a way to do this? Thanks. </p>
  
  <p>HTML</p>
  
  <pre><code>&lt;div ng-controller="DatepickerDemoCtrl"&gt;
      &lt;div class="row"&gt;
        &lt;label&gt;Start&lt;/label&gt;
          &lt;div class="col-md-6"&gt;
              &lt;div class="input-group"&gt;
                &lt;input
                  type="text"
                  id="popup"
                  class="form-control"
                  datepicker-popup=""
                  ng-model="date1"
                  is-open="opened"
                  min-date="minDate"
                  max-date="'2015-12-22'"
                  ng-click="open()"/&gt;
                &lt;span class="input-group-btn"&gt;
                  &lt;label for="popup" class="btn btn-default"&gt;&lt;i class="glyphicon glyphicon-calendar"&gt;&lt;/i&gt;&lt;/label&gt;
                &lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="row"&gt;
        &lt;label&gt;End&lt;/label&gt;
          &lt;div class="col-md-6"&gt;
              &lt;div class="input-group"&gt;
                &lt;input
                  type="text"
                  id="popup"
                  class="form-control"
                  datepicker-popup=""
                  ng-model="date2"
                  is-open="opened"
                  min-date="minDate"
                  max-date="'2015-12-22'"
                  ng-click="open()"/&gt;
                &lt;span class="input-group-btn"&gt;
                  &lt;label for="popup" class="btn btn-default"&gt;&lt;i class="glyphicon glyphicon-calendar"&gt;&lt;/i&gt;&lt;/label&gt;
                &lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>angular.module('ui.bootstrap.demo', ['ui.bootstrap']).controller('DatepickerDemoCtrl', function ($scope, $filter) {
    $scope.date1 = null;
    $scope.date2 = null;
    $scope.minDate = new Date();
    $scope.open = function() {
      $scope.opened = true;
    };
  })
  
  .constant('datepickerPopupConfig', {
    datepickerPopup: "MMM d, yyyy",
    closeOnDateSelection: true,
    appendToBody: false,
    showButtonBar: false
  })
  
  .constant('datepickerConfig', {
    formatDay: 'dd',
    formatMonth: 'MMMM',
    formatYear: 'yyyy',
    formatDayHeader: 'EEE',
    formatDayTitle: 'MMMM yyyy',
    formatMonthTitle: 'yyyy',
    datepickerMode: 'day',
    minMode: 'day',
    maxMode: 'year',
    showWeeks: false,
    startingDay: 0,
    yearRange: 20,
    minDate: null,
    maxDate: null
  })
  </code></pre>