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

Commit f147d22

Browse files
committed
fix(datepickerPopup): apply timezone conversion
- Apply timezone conversion to selecting today Closes #6173 Fixes #6147
1 parent f798a47 commit f147d22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/datepickerPopup/popup.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ function($scope, $element, $attrs, $compile, $log, $parse, $window, $document, $
242242
date = new Date($scope.date);
243243
date.setFullYear(today.getFullYear(), today.getMonth(), today.getDate());
244244
} else {
245-
date = new Date(today.setHours(0, 0, 0, 0));
245+
date = dateParser.fromTimezone(today, ngModelOptions.timezone);
246+
date.setHours(0, 0, 0, 0);
246247
}
247248
}
248249
$scope.dateSelection(date);

0 commit comments

Comments
 (0)