mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-02 09:00:34 +08:00
Similar to `input[number]` Angular will throw if the model value for a `input[date]` is not a `Date` object. For `Invalid Date`s (dates whose `getTime()` is `NaN`) `input[date]` will render an empty string. Closes #8949 Closes #9375
12 lines
433 B
Plaintext
12 lines
433 B
Plaintext
@ngdoc error
|
|
@name ngModel:datefmt
|
|
@fullName Model is not a date object
|
|
@description
|
|
|
|
All date-related inputs like `<input type="date">` require the model to be a `Date` object.
|
|
If the model is something else, this error will be thrown.
|
|
Angular does not set validation errors on the `<input>` in this case
|
|
as those errors are shown to the user, but the erroneous state was
|
|
caused by incorrect application logic and not by the user.
|
|
|