diff options
author | Kato Kazuyoshi <kato.kazuyoshi@gmail.com> | 2011-05-05 04:07:43 +0900 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2011-05-04 17:12:01 -0400 |
commit | 870977ae6b314cecb27a7bfe18b0fdf46c8e9f79 (patch) | |
tree | 453e126685700ea559cf2b5e222bad061b989925 /ui/jquery.ui.datepicker.js | |
parent | f9faa0ab5fb2b9f332de93fd9d8fb97e9957ff6d (diff) | |
download | jquery-ui-870977ae6b314cecb27a7bfe18b0fdf46c8e9f79.tar.gz jquery-ui-870977ae6b314cecb27a7bfe18b0fdf46c8e9f79.zip |
Datepicker: Remove old "ui-datepicker-multi-N" before add new one. Fixed #6704 - Display overflow when multiple datepickers have different numberOfMonths.
(cherry picked from commit fc97ccd398b60525fd9e4c0e9aa1f51048984394)
Diffstat (limited to 'ui/jquery.ui.datepicker.js')
-rw-r--r-- | ui/jquery.ui.datepicker.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index fe24d695a..2ab23a6eb 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -683,10 +683,9 @@ $.extend(Datepicker.prototype, { var numMonths = this._getNumberOfMonths(inst); var cols = numMonths[1]; var width = 17; + inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width(''); if (cols > 1) inst.dpDiv.addClass('ui-datepicker-multi-' + cols).css('width', (width * cols) + 'em'); - else - inst.dpDiv.removeClass('ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4').width(''); inst.dpDiv[(numMonths[0] != 1 || numMonths[1] != 1 ? 'add' : 'remove') + 'Class']('ui-datepicker-multi'); inst.dpDiv[(this._get(inst, 'isRTL') ? 'add' : 'remove') + |