From: Alexander Ebert Date: Mon, 29 Apr 2013 20:38:28 +0000 (+0200) Subject: Forcing position of jQuery UI's DatePicker X-Git-Tag: 2.0.0_Beta_1~274^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5a1293b456c7001cc6d9aa19ff411f4b9699ac3c;p=GitHub%2FWoltLab%2FWCF.git Forcing position of jQuery UI's DatePicker --- diff --git a/wcfsetup/install/files/js/WCF.js b/wcfsetup/install/files/js/WCF.js index 98394d2156..980f194059 100755 --- a/wcfsetup/install/files/js/WCF.js +++ b/wcfsetup/install/files/js/WCF.js @@ -2289,6 +2289,17 @@ WCF.Date.Picker = { $input.datepicker({ altField: '#' + $input.wcfIdentify() + 'DatePicker', altFormat: 'yy-mm-dd', // PHPs strtotime() understands this best + beforeShow: function(input, instance) { + // dirty hack to force opening below the input + setTimeout(function() { + instance.dpDiv.position({ + my: 'left top', + at: 'left bottom', + collision: 'none', + of: input + }); + }, 1); + }, changeMonth: true, changeYear: true, dateFormat: this._dateFormat, @@ -2340,6 +2351,17 @@ WCF.Date.Picker = { altFieldTimeOnly: false, altFormat: 'yy-mm-dd', // PHPs strtotime() understands this best altTimeFormat: 'HH:mm', + beforeShow: function(input, instance) { + // dirty hack to force opening below the input + setTimeout(function() { + instance.dpDiv.position({ + my: 'left top', + at: 'left bottom', + collision: 'none', + of: input + }); + }, 1); + }, changeMonth: true, changeYear: true, controlType: 'select',