Skip to content

Commit

Permalink
fix(datepicker): Don't parse the date twice
Browse files Browse the repository at this point in the history
  • Loading branch information
realityking committed May 18, 2015
1 parent 2a2e5de commit f307468
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/datepicker/datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi

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

var documentClickBind = function(event) {
Expand Down

4 comments on commit f307468

@hmillet
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for me when enter a date in french format (dd/MM/yyyy) in an input text 👍

@almeidap
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix @realityking !

This should be urgently be released as a hotfix ASAP. I can't imagine the number of wasted hours by developers around the world trying to patch this...

@bensquire
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance we get this merged and hot-fixed please? Its as @almeidap pointed out, cost us quite a lot of time so far 😢

@nethulap
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here waiting for the hot-fix..

Please sign in to comment.