From f5dfcd05e02cfc399c83d29f43e51e270b8fe8d7 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Thu, 27 Feb 2014 18:16:08 +0100 Subject: [PATCH] Removed timezone offset in date picker --- wcfsetup/install/files/js/WCF.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index b9b3021afd..1c3e870126 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -2898,6 +2898,12 @@ WCF.Date.Picker = { // format default date if ($inputValue) { + if (!$hasTime) { + // drop timezone for date-only input + $inputValue = new Date($inputValue); + $inputValue.setMinutes($inputValue.getMinutes() + $inputValue.getTimezoneOffset()); + } + $input.datepicker('setDate', $inputValue); } -- 2.20.1