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

Commit

Permalink
fix(datepickerPopup): change to toTimezone
Browse files Browse the repository at this point in the history
- Change conversion to use `toTimezone`, as the date is going from UI date with timezone applied to timezone set by `ngModelOptions`

Fixes #6235
  • Loading branch information
wesleycho committed Nov 27, 2016
1 parent 8a4f625 commit 1962485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/datepickerPopup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 1962485

Please sign in to comment.