You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Angular 1.3.3
Problem is that in general, objects are compared using !==, which does not work as expected for Date objects. Culprit is this function
function writeToModelIfNeeded() {
if (ctrl.$modelValue !== prevModelValue) {
ctrl.$$writeModelToScope();
}
}
for this to work, it would have to be same instance of the Date. For date input types, this comparsion should be smarter and compare Date.getTime() insted.
This also causes to fire changed event during initialization when max or min are used (since they call $validate).
Angular 1.3.3
Problem is that in general, objects are compared using !==, which does not work as expected for Date objects. Culprit is this function
for this to work, it would have to be same instance of the Date. For date input types, this comparsion should be smarter and compare Date.getTime() insted.
This also causes to fire changed event during initialization when max or min are used (since they call $validate).
Sample: http://plnkr.co/edit/vXNfLHkF9wbhjJRueblL?p=preview
In the sample, you can check that in writeToModelIfNeeded during init are both prevModelValue and $modelValue same, just not the same instance.
The text was updated successfully, but these errors were encountered: