title: Make angular ui-bootstrap datepicker the only way to add date to input
body: <p>I would like to disable key input and force the user to use the datepicker to add date to the input but I don't know how to do this. 
  In the current solution the user can select date but also type or erase the value directly in the input. I would like to disable the input, so the user can't type or erase anything, but still make the datepicker available.</p>
  
  <p>Does angular ui-bootstrap already include this feature (checked the docs but didn't find any..) or do anyone have a solution for this?</p>
  
  <p>This is a simpler version copy from the <a href="https://angular-ui.github.io/bootstrap/" rel="nofollow">ui-bootstrap docs</a> but its basically what I use in my site:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>angular.module('ui.bootstrap.demo', ['ngAnimate', 'ngSanitize', 'ui.bootstrap']);
  angular.module('ui.bootstrap.demo').controller('DatepickerPopupDemoCtrl', function ($scope) {
    $scope.today = function() {
      $scope.dt = new Date();
    };
    $scope.today();
  
    $scope.dateOptions = {
      formatYear: 'yy'
    };
  
    $scope.open2 = function() {
      $scope.popup2.opened = true;
    };
  
    $scope.popup2 = {
      opened: false
    };
  
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
  &lt;html ng-app="ui.bootstrap.demo"&gt;
    &lt;head&gt;
      &lt;script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular.js"&gt;&lt;/script&gt;
      &lt;script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular-animate.js"&gt;&lt;/script&gt;
      &lt;script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.8/angular-sanitize.js"&gt;&lt;/script&gt;
      &lt;script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-2.1.3.js"&gt;&lt;/script&gt;
      &lt;script src="example.js"&gt;&lt;/script&gt;
      &lt;link href="//netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"&gt;
    &lt;/head&gt;
    &lt;body&gt;
  
  &lt;div ng-controller="DatepickerPopupDemoCtrl"&gt;
     
      &lt;h4&gt;Popup&lt;/h4&gt;
      &lt;div class="row"&gt;
  
        &lt;div class="col-md-6"&gt;
          &lt;p class="input-group"&gt;
            &lt;input type="text" class="form-control" uib-datepicker-popup ng-model="dt" is-open="popup2.opened" datepicker-options="dateOptions" ng-required="true" close-text="Close" /&gt;
            &lt;span class="input-group-btn"&gt;
              &lt;button type="button" class="btn btn-default" ng-click="open2()"&gt;&lt;i class="glyphicon glyphicon-calendar"&gt;&lt;/i&gt;&lt;/button&gt;
            &lt;/span&gt;
          &lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
     &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>