aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/visual/datepicker/multimonth.html21
-rw-r--r--themes/base/ui.datepicker.css2
-rw-r--r--ui/ui.datepicker.js3
3 files changed, 24 insertions, 2 deletions
diff --git a/tests/visual/datepicker/multimonth.html b/tests/visual/datepicker/multimonth.html
new file mode 100644
index 000000000..c59d75b13
--- /dev/null
+++ b/tests/visual/datepicker/multimonth.html
@@ -0,0 +1,21 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <title>Datepicker Visual Test : Default</title>
+ <link rel="stylesheet" href="../visual.css" type="text/css" />
+ <link rel="stylesheet" href="../../../themes/base/ui.all.css" type="text/css">
+ <script type="text/javascript" src="../../../jquery-1.3.1.js"></script>
+ <script type="text/javascript" src="../../../ui/ui.core.js"></script>
+ <script type="text/javascript" src="../../../ui/ui.datepicker.js"></script>
+ <script type="text/javascript">
+ $(function() {
+ $('#datepicker').datepicker({numberOfMonths: [4,3], showButtonPanel: true });
+ });
+ </script>
+</head>
+<body>
+
+<div id="datepicker"></div>
+
+</body>
+</html>
diff --git a/themes/base/ui.datepicker.css b/themes/base/ui.datepicker.css
index 92986c9e8..567f8c97b 100644
--- a/themes/base/ui.datepicker.css
+++ b/themes/base/ui.datepicker.css
@@ -33,7 +33,7 @@
.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
-.ui-datepicker-row-break { clear:left; width:100%; }
+.ui-datepicker-row-break { clear:both; width:100%; }
/* RTL support */
.ui-datepicker-rtl { direction: rtl; }
diff --git a/ui/ui.datepicker.js b/ui/ui.datepicker.js
index 9237de33f..eb3162f02 100644
--- a/ui/ui.datepicker.js
+++ b/ui/ui.datepicker.js
@@ -1400,7 +1400,8 @@ $.extend(Datepicker.prototype, {
drawMonth = 0;
drawYear++;
}
- calender += '</tbody></table>' + (isMultiMonth ? '</div>' : '');
+ calender += '</tbody></table>' + (isMultiMonth ? '</div>' +
+ ((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
group += calender;
}
html += group;