Skip to content

Fixed #7043 - Datepicker: Using multiple months always renders 6 rows of dates even if only 5 are neededf #223

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 1 commit into from
May 11, 2011

Conversation

kzys
Copy link
Contributor

@kzys kzys commented May 6, 2011

Datepicker don't calculate the number of rows when you using multiple months.

I don't know why because it's easy. If we have a reason to choose 6, we should document on somewhere...

@jzaefferer
Copy link
Member

Probably to ensure that all months have the same height. Did you check if you modifications makes a visual difference?

@kzys
Copy link
Contributor Author

kzys commented May 6, 2011

I see. This modification causes a visual difference and we can't say good or not. Because we don't have the specification of this behavior.

@kzys
Copy link
Contributor Author

kzys commented May 11, 2011

@scottgonzalez changed this ticket from "new" to "open" on Trac. I want to hear his opinion.

@scottgonzalez
Copy link
Member

I don't know why it was hard-coded at 6. The visual test is if you have two months showing that both only need 5 rows, then each calendar should only be 5 rows tall. If you have two months showing and one needs 5 and the other needs 6, then it should still display properly (being 6 tall). I'll test out the change now.

@scottgonzalez
Copy link
Member

The patch does exactly what you'd expect and fixes the bug. Comparing the current behavior to the patched behavior, my guess is that the height is hard-coded at 6 to avoid changing heights as you change the month. However, since the height changes when displaying only one month, I don't think it makes sense to have different behavior for multiple months. I'll pull the right now and merge down to 1-8-stable.

scottgonzalez added a commit that referenced this pull request May 11, 2011
Fixed #7043 - Datepicker: Using multiple months always renders 6 rows of dates even if only 5 are neededf
@scottgonzalez scottgonzalez merged commit d3e21cf into jquery:master May 11, 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