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

Merged
merged 1 commit into from May 11, 2011

Conversation

Projects
None yet
3 participants
Contributor

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

Owner

jzaefferer commented May 6, 2011

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

Contributor

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.

Contributor

kzys commented May 11, 2011

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

Owner

scottgonzalez commented May 11, 2011

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.

Owner

scottgonzalez commented May 11, 2011

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