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

Commit

Permalink
fix(calendar): Update ngModel instead of ctrl.date on input change
Browse files Browse the repository at this point in the history
Current behavior doesn't propagate user input to ng-model when a valid
date is entered.
  • Loading branch information
Michael Chen authored and jelbourn committed Aug 13, 2015
1 parent e605373 commit 36d355a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/datepicker/datePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
self.inputElement.size = inputString.length + EXTRA_INPUT_SIZE;

if (self.dateUtil.isValidDate(parsedDate) && self.dateLocale.isDateComplete(inputString)) {
self.date = parsedDate;
self.ngModelCtrl.$setViewValue(parsedDate);
self.$scope.$apply();
}
});
Expand Down

0 comments on commit 36d355a

Please sign in to comment.