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.

This commit is contained in:
Ca-Phun Ung 2009-02-01 05:50:12 +00:00
parent ce0daae232
commit 1866e1382f
3 changed files with 24 additions and 2 deletions

View File

@ -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>

View 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; }

View 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;