Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Commit 36d355a

Browse files
Michael Chenjelbourn
authored andcommitted
fix(calendar): Update ngModel instead of ctrl.date on input change
Current behavior doesn't propagate user input to ng-model when a valid date is entered.
1 parent e605373 commit 36d355a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/datepicker/datePicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
self.inputElement.size = inputString.length + EXTRA_INPUT_SIZE;
214214

215215
if (self.dateUtil.isValidDate(parsedDate) && self.dateLocale.isDateComplete(inputString)) {
216-
self.date = parsedDate;
216+
self.ngModelCtrl.$setViewValue(parsedDate);
217217
self.$scope.$apply();
218218
}
219219
});

0 commit comments

Comments
 (0)