aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorCa-Phun Ung <pazu2k@gmail.com>2008-12-23 19:39:28 +0000
committerCa-Phun Ung <pazu2k@gmail.com>2008-12-23 19:39:28 +0000
commit56e8aad838e9609730d087ce44c37e2388b54e59 (patch)
treeac3945f969b9982435e7a0c432c007f5423d01fd /ui
parentb2c2240663aeb4139aca27288951ecc487a71348 (diff)
downloadjquery-ui-56e8aad838e9609730d087ce44c37e2388b54e59.tar.gz
jquery-ui-56e8aad838e9609730d087ce44c37e2388b54e59.zip
Datepicker - fixes #3695 [multi-datepicker layout issue in IE]: IE doesn't seem to like dynamic widths so had no other choice but to hard code some width values (this needs a better fix).
Diffstat (limited to 'ui')
-rw-r--r--ui/ui.datepicker.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js
index 1a64b0b5c..391b45087 100644
--- a/ui/ui.datepicker.js
+++ b/ui/ui.datepicker.js
@@ -595,6 +595,24 @@ $.extend(Datepicker.prototype, {
.trigger('mouseover')
.end();
var numMonths = this._getNumberOfMonths(inst);
+ var months = this._get(inst, 'numberOfMonths');
+ var multi = '';
+ if (months > 1) {
+ if (months % 4 == 0) {
+ multi = 'ui-datepicker-multi-4';
+ inst.dpDiv.css('width','60em');
+ } else if (months % 3 == 0) {
+ multi = 'ui-datepicker-multi-3';
+ inst.dpDiv.css('width','51em');
+ } else if (months % 2 == 0) {
+ multi = 'ui-datepicker-multi-2';
+ inst.dpDiv.css('width','34em');
+ }
+ inst.dpDiv.addClass(multi);
+ } else {
+ inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4');
+ inst.dpDiv.width('');
+ }
inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') +
'Class']('ui-datepicker-multi');
inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') +