title: Angular UI Bootstrap monthpicker
body: <p>I am trying to setup the date picker to work as a month picker. Everything works as expected as long as you're clicking a month and/or going to prev/next year. However, if you want to broaden the year selection by clicking the current year from the top, I get a JavaScript error.</p>
  
  <p>HTML:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;div ng-app="app"&gt;
      &lt;div ng-controller="TestController"&gt;
          &lt;input type="date" class="form-control" ng-model="date" datepicker-popup="MM/yyyy" is_open="date_opened" ng-focus="date_opened = true" ng-click="date_opened = true" datepicker-options="datepickerOptions"&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre class="lang-js prettyprint-override"><code>(function() {
      'use strict';
  
      var app  = angular.module('app', [
          'ui.bootstrap'
      ]);
  
      app.controller('TestController', ['$scope', function($scope) {
          $scope.datepickerOptions = {
              datepickerMode: "'month'",
              minMode: 'month'
          };
      }]);
  })();
  </code></pre>
  
  <p>Here's the <a href="http://jsfiddle.net/o1mLa6Lr/2/" rel="nofollow">JSFiddle</a> demonstrating it (angularjs 1.2.26, ui-bootstrap 0.11.2).</p>