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...
Datepicker: Fixed #7043 - Using multiple months always renders 6 rows…
… of dates even if only 5 are needed.
Probably to ensure that all months have the same height. Did you check if you modifications makes a visual difference?
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.
@scottgonzalez changed this ticket from "new" to "open" on Trac. I want to hear his opinion.
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.
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.