]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: Fixed display of month and year dropdowns when showing month after year.
authorScott González <scott.gonzalez@gmail.com>
Fri, 4 Dec 2009 04:02:55 +0000 (04:02 +0000)
committerScott González <scott.gonzalez@gmail.com>
Fri, 4 Dec 2009 04:02:55 +0000 (04:02 +0000)
Fixes #4420 - showMonthAfterYear make calendar disorder.

Thanks bhornseth for the patch.

ui/jquery.ui.datepicker.js

index b81f0ee2936137cdd48472f3fcfc1d7d3760f6c2..bc3a322abc5fae7ba1b2dcacda16513755fe2489 100644 (file)
@@ -1541,7 +1541,7 @@ $.extend(Datepicker.prototype, {
                }
                html += this._get(inst, 'yearSuffix');
                if (showMonthAfterYear)
-                       html += (secondary || changeMonth || changeYear ? '&#xa0;' : '') + monthHtml;
+                       html += ((secondary || changeMonth || changeYear) && (!(changeMonth && changeYear)) ? '&#xa0;' : '') + monthHtml;
                html += '</div>'; // Close datepicker_header
                return html;
        },