title: ng-pattern not working with angular ui datepicker
body: <p>I want to use ng-pattern to further enforce the date format on an input field using Angular UI datepicker. The problem is when I do this it's always showing invalid.</p>
  
  <pre><code>&lt;p class="input-group"&gt;
      &lt;input type="text" datepicker-popup="MM/dd/yyyy" is-open="opened" close-text="Close"
          ng-model="someDate" class="form-control" placeholder="mm/dd/yyyy"
          ng-pattern="/^(0[1-9]|1[0-2])\/(0[1-9]|1\d|2\d|3[01])\/(19|20)\d{2}$/" required /&gt;
      &lt;span class="input-group-btn"&gt;
          &lt;button type="button" class="btn btn-default" ng-click="open($event)"&gt;
              &lt;i class="glyphicon glyphicon-calendar"&gt;&lt;/i&gt;
          &lt;/button&gt;
      &lt;/span&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>If I apply the same ng-pattern to a plain input field (no datepicker), it works as expected.</p>
  
  <p>There seems to be a conflict but I'm not sure what it is. Any ideas?</p>
  
  <p><strong>Update:</strong></p>
  
  <p><a href="http://plnkr.co/edit/9aOFQG6hvL8xwDB8tHKQ">Here</a> is a simple plunker to illustrate the issue as requested. After some further digging it does seem to be running the pattern against the underlying <code>Date</code> object. When I use a custom directive that formats the date, however, it runs it against the actual input.</p>
  
  <p>The only documentation I see for ng-pattern is a brief mention <a href="https://docs.angularjs.org/api/ng/directive/input">here</a> under input. Is there anything else that maybe I'm missing?</p>