Skip to content

Commit

Permalink
Fix datepicker input display. angular-ui#2932, angular-ui#3047
Browse files Browse the repository at this point in the history
Add AngularJS 1.3 compatibility - datepicker display issue reported in angular-ui#2932 and angular-ui#3047.
  • Loading branch information
shwei committed Dec 10, 2014
1 parent eec68d8 commit b72136e
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 @@ -546,7 +546,7 @@ function ($compile, $parse, $document, $position, dateFilter, dateParser, datepi

// Outter change
ngModel.$render = function() {
var date = ngModel.$viewValue ? dateFilter(ngModel.$viewValue, dateFormat) : '';
var date = ngModel.$viewValue ? dateFilter(new Date(ngModel.$viewValue), dateFormat) : '';
element.val(date);
scope.date = parseDate( ngModel.$modelValue );
};
Expand Down

0 comments on commit b72136e

Please sign in to comment.