Fixed date/time picker
authorAlexander Ebert <ebert@woltlab.com>
Sat, 28 Sep 2013 10:32:56 +0000 (12:32 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 28 Sep 2013 10:33:32 +0000 (12:33 +0200)
Fixes #1519

com.woltlab.wcf/templates/headInclude.tpl
wcfsetup/install/files/js/WCF.js

index 6d2edaa025a2d8cecb79adeb098e102119b00e42..e74ca760fc9f4e75f1d8df33d731004ad66d0fb3 100644 (file)
@@ -38,8 +38,8 @@
        //]]>
 </script>
 {/if}
-<script data-relocate="true" src="{@$__wcf->getPath()}js/3rdParty/jquery-ui.nestedSortable.min.js?v={@$__wcfVersion}"></script>
-<script data-relocate="true" src="{@$__wcf->getPath()}js/3rdParty/jquery-ui.timepicker.min.js?v={@$__wcfVersion}"></script>
+<script data-relocate="true" src="{@$__wcf->getPath()}js/3rdParty/jquery-ui.nestedSortable{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script>
+<script data-relocate="true" src="{@$__wcf->getPath()}js/3rdParty/jquery-ui.timepicker{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script>
 <script data-relocate="true" src="{@$__wcf->getPath()}js/WCF{if !ENABLE_DEBUG_MODE}.min{/if}.js?v={@$__wcfVersion}"></script>
 <script data-relocate="true">
        //<![CDATA[
index 47a9c8c48208c59b15988b5412aedf8c859f7f45..d47e9b077531a62f2364280545dea226d8eebafa 100755 (executable)
@@ -2647,7 +2647,7 @@ WCF.Date.Picker = {
                // simply continue :)   - Alex
                var $__log = $.timepicker.log;
                $.timepicker.log = function(error) {
-                       if (error.indexOf('Error parsing the date/time string: Unexpected literal at position') == -1) {
+                       if (error.indexOf('Error parsing the date/time string: Unexpected literal at position') == -1 && error.indexOf('Error parsing the date/time string: Unknown name at position') == -1) {
                                $__log(error);
                        }
                };
@@ -2676,8 +2676,8 @@ WCF.Date.Picker = {
                // L    Whether it's a leap year
                var $replacementTable = {
                        // time
-                       'a': ' tt',
-                       'A': ' TT',
+                       'a': 'tt',
+                       'A': 'TT',
                        'g': 'h',
                        'G': 'H',
                        'h': 'hh',
@@ -2730,6 +2730,8 @@ WCF.Date.Picker = {
                        
                        return part1 + part2;
                });
+               
+               console.debug(this._dateFormat + " " + this._timeFormat);
        },
        
        /**
@@ -2786,7 +2788,7 @@ WCF.Date.Picker = {
                        
                        // format default date
                        if ($inputValue) {
-                               $input.datepicker('setDate', new Date($inputValue));
+                               $input.datepicker('setDate', new $inputValue);
                        }
                        
                        // bug workaround: setDate creates the widget but unfortunately doesn't hide it...
@@ -2854,7 +2856,7 @@ WCF.Date.Picker = {
                        
                        // format default date
                        if ($inputValue) {
-                               $input.removeClass('hasDatepicker').datetimepicker('setDate', new Date($inputValue));
+                               $input.removeClass('hasDatepicker').datetimepicker('setDate', $inputValue);
                        }
                        
                        // bug workaround: setDate creates the widget but unfortunately doesn't hide it...