From 5a1293b456c7001cc6d9aa19ff411f4b9699ac3c Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 29 Apr 2013 22:38:28 +0200 Subject: [PATCH] Forcing position of jQuery UI's DatePicker --- wcfsetup/install/files/js/WCF.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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', -- 2.20.1