]> source.dussan.org Git - jquery-ui.git/commitdiff
datepicker: #4032 - Incorrect layout in multiple month rows. I noticed the static...
authorCa-Phun Ung <pazu2k@gmail.com>
Sun, 1 Feb 2009 05:50:12 +0000 (05:50 +0000)
committerCa-Phun Ung <pazu2k@gmail.com>
Sun, 1 Feb 2009 05:50:12 +0000 (05:50 +0000)
tests/visual/datepicker/multimonth.html [new file with mode: 0644]
themes/base/ui.datepicker.css
ui/ui.datepicker.js

diff --git a/tests/visual/datepicker/multimonth.html b/tests/visual/datepicker/multimonth.html
new file mode 100644 (file)
index 0000000..c59d75b
--- /dev/null
@@ -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>
index 92986c9e8214327cffa5c0ec8b95d4ac75a55761..567f8c97b562d47a0998236c567a04802c7d69d7 100644 (file)
@@ -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; }
index 9237de33f5af04f516827ae3084c65d30edd0ff4..eb3162f02e9bbaef52af453431207e3aa1b33ade 100644 (file)
@@ -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;