title: angular.js:14800 Error: [ngModel:datefmt] Expected `2019-12-29` to be a date
body: <p>I have my data field like: </p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;label for=""&gt;Enter Expiry Date&lt;/label&gt;
      &lt;input type="date" ng-model="product.expiryDate"&gt;&lt;/input&gt;
      &lt;p class="help-block"&gt;&lt;/p&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>Input date format looks like: <strong>dd-mm-yyyy</strong> , 
  And my controller looks like:    </p>
  
  <pre><code> app.controller('xyz', function(){
      $scope.product = productService.getProduct(id);  //rough code
  });
  </code></pre>
  
  <p>So, this is setting all other input fields except date and angular giving error as mentioned in title. Even i checked that my date format inside product like: </p>
  
  <pre><code>alert(JSON.stringify(product.expiryDate));
  </code></pre>
  
  <p>It shows date format as: <strong>yyyy-mm-dd</strong>.</p>
  
  <ol>
  <li>My problem is why i am getting error like: <strong>angular.js:14800 Error: [ngModel:datefmt] Expected <code>2019-12-29</code> to be a date</strong> ?</li>
  <li>Is there any other way to solve problem?</li>
  </ol>