From b72136e59211abb83643b28a61b031f1fbb524c2 Mon Sep 17 00:00:00 2001 From: "Shang Heng (Shawn) Wei" Date: Tue, 9 Dec 2014 17:34:32 -0800 Subject: [PATCH] Fix datepicker input display. #2932, #3047 Add AngularJS 1.3 compatibility - datepicker display issue reported in #2932 and #3047. --- src/datepicker/datepicker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datepicker/datepicker.js b/src/datepicker/datepicker.js index 05784947d0..ee55ab6ec7 100644 --- a/src/datepicker/datepicker.js +++ b/src/datepicker/datepicker.js @@ -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 ); };