From: Alexander Ebert Date: Thu, 27 Feb 2014 17:16:08 +0000 (+0100) Subject: Removed timezone offset in date picker X-Git-Tag: 2.0.3~8^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f5dfcd05e02cfc399c83d29f43e51e270b8fe8d7;p=GitHub%2FWoltLab%2FWCF.git Removed timezone offset in date picker --- 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); }