Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 5188463

Browse files
mebibouwesleycho
authored andcommitted
fix(datepickerPopup): convert numbers to date before parsing
Closes #5873 Fixes #5871
1 parent a417ec2 commit 5188463

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/datepickerPopup/popup.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $
133133
return value;
134134
}
135135

136-
$scope.date = dateParser.fromTimezone(value, timezone);
137-
138-
if (angular.isNumber($scope.date)) {
139-
$scope.date = new Date($scope.date);
136+
if (angular.isNumber(value)) {
137+
value = new Date(value);
140138
}
141139

140+
$scope.date = dateParser.fromTimezone(value, timezone);
141+
142142
return dateParser.filter($scope.date, dateFormat);
143143
});
144144
} else {

0 commit comments

Comments
 (0)