Skip to content

Commit f307468

Browse files
committed
fix(datepicker): Don't parse the date twice
Fixes angular-ui#3644, angular-ui#3617
1 parent 2a2e5de commit f307468

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/datepicker/datepicker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi
650650

651651
// Detect changes in the view from the text box
652652
ngModel.$viewChangeListeners.push(function () {
653-
scope.date = dateParser.parse(ngModel.$viewValue, dateFormat, scope.date) || new Date(ngModel.$viewValue);
653+
scope.date = ngModel.$modelValue;
654654
});
655655

656656
var documentClickBind = function(event) {

0 commit comments

Comments
 (0)