From 196248550477afe5bb5db211622ac751ae52e574 Mon Sep 17 00:00:00 2001 From: Wesley Cho Date: Sun, 27 Nov 2016 02:26:52 -0800 Subject: [PATCH] fix(datepickerPopup): change to toTimezone - Change conversion to use `toTimezone`, as the date is going from UI date with timezone applied to timezone set by `ngModelOptions` Fixes #6235 --- src/datepickerPopup/popup.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/datepickerPopup/popup.js b/src/datepickerPopup/popup.js index 1821ffa445..0d03c4e73d 100644 --- a/src/datepickerPopup/popup.js +++ b/src/datepickerPopup/popup.js @@ -333,7 +333,7 @@ function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $ if (angular.isString(viewValue)) { var date = parseDateString(viewValue); if (!isNaN(date)) { - return dateParser.fromTimezone(date, ngModelOptions.timezone); + return dateParser.toTimezone(date, ngModelOptions.timezone); } }