Skip to content

Datepicker: Calculate the max number of rows necessary when displaying months. Fixes #7043 - Datepicker: Using multiple months always renders 6 rows of dates even if only 5 are needed #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 16, 2011

Conversation

kborchers
Copy link
Member

Datepicker: Calculate the max number of rows necessary when displaying months. Fixes #7043 - Datepicker: Using multiple months always renders 6 rows of dates even if only 5 are needed

…g months. Fixes #7043 - Datepicker: Using multiple months always renders 6 rows of dates even if only 5 are needed
@kborchers
Copy link
Member Author

@scottgonzalez Here is my solution to this. I removed the numMonths check when closing the datepicker html and it appears to work for single and multi month datepickers in all browsers

@@ -1547,8 +1553,7 @@ $.extend(Datepicker.prototype, {
drawMonth = 0;
drawYear++;
}
calender += '</tbody></table>' + (isMultiMonth ? '</div>' +
((numMonths[0] > 0 && col == numMonths[1]-1) ? '<div class="ui-datepicker-row-break"></div>' : '') : '');
calender += '</tbody></table>' + (isMultiMonth ? '</div>' : '');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems this diff would lose the ui-datepicker-row-break feature....

http://cl.ly/1w0o1D0X0Q1Q12343P2S

…de font-size coming from ui-widget which caused the height to be too tall in IE
scottgonzalez added a commit that referenced this pull request Jun 16, 2011
Datepicker: Calculate the max number of rows necessary when displaying months. Fixes #7043 - Datepicker: Using multiple months always renders 6 rows of dates even if only 5 are needed
@scottgonzalez scottgonzalez merged commit fb210ae into jquery:master Jun 16, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants