r1947 - in trunk: tests/visual/datepicker themes/base ui
Author: pazu2k@gmail.com
Date: Sat Jan 31 21:50:12 2009
New Revision: 1947
Added:
trunk/tests/visual/datepicker/multimonth.html
Modified:
trunk/themes/base/ui.datepicker.css
trunk/ui/ui.datepicker.js
Log:
datepicker: #4032 - Incorrect layout in multiple month rows. I noticed the
static tests were recently updated with a row-break so I have added the
row-break fix for now so it will be ready for the release. We should
seriously consider inline-block.
Added: trunk/tests/visual/datepicker/multimonth.html
==============================================================================
--- (empty file)
+++ trunk/tests/visual/datepicker/multimonth.html Sat Jan 31 21:50:12 2009
@@ -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>
Modified: trunk/themes/base/ui.datepicker.css
==============================================================================
--- trunk/themes/base/ui.datepicker.css (original)
+++ trunk/themes/base/ui.datepicker.css Sat Jan 31 21:50:12 2009
@@ -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; }
Modified: trunk/ui/ui.datepicker.js
==============================================================================
--- trunk/ui/ui.datepicker.js (original)
+++ trunk/ui/ui.datepicker.js Sat Jan 31 21:50:12 2009
@@ -1400,7 +1400,8 @@
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;