Fix datepicker w/ predefined value
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 2 Sep 2014 18:43:31 +0000 (20:43 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 2 Sep 2014 18:45:16 +0000 (20:45 +0200)
wcfsetup/install/files/js/WCF.js

index 424c4721415525b09a5aaccebd5cbc61800f1a21..f42d95b45b6602c5336fc234d013fc30b98c4e27 100755 (executable)
@@ -3114,9 +3114,9 @@ WCF.Date.Picker = {
                        
                        // format default date
                        if ($inputValue) {
+                               $inputValue = new Date($inputValue);
                                if (!$hasTime) {
                                        // drop timezone for date-only input
-                                       $inputValue = new Date($inputValue);
                                        $inputValue.setMinutes($inputValue.getMinutes() + $inputValue.getTimezoneOffset());
                                }