]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: Separate month and year unless both are drop-downs
authorKeith Wood <kbwood.au@gmail.com>
Sat, 6 Feb 2010 23:14:40 +0000 (23:14 +0000)
committerKeith Wood <kbwood.au@gmail.com>
Sat, 6 Feb 2010 23:14:40 +0000 (23:14 +0000)
ui/jquery.ui.datepicker.js

index 3c0b799a8d99482929295f5071402273c4d01652..91f863ef9798cf9f5ec22f261c2f7b717232c358 100644 (file)
@@ -1523,7 +1523,7 @@ $.extend(Datepicker.prototype, {
                var monthHtml = '';
                // month selection
                if (secondary || !changeMonth)
-                       monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span> ';
+                       monthHtml += '<span class="ui-datepicker-month">' + monthNames[drawMonth] + '</span>';
                else {
                        var inMinYear = (minDate && minDate.getFullYear() == drawYear);
                        var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear);
@@ -1541,7 +1541,7 @@ $.extend(Datepicker.prototype, {
                        monthHtml += '</select>';
                }
                if (!showMonthAfterYear)
-                       html += monthHtml + ((secondary || changeMonth || changeYear) && (!(changeMonth && changeYear)) ? '&#xa0;' : '');
+                       html += monthHtml + (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '');
                // year selection
                if (secondary || !changeYear)
                        html += '<span class="ui-datepicker-year">' + drawYear + '</span>';
@@ -1572,7 +1572,7 @@ $.extend(Datepicker.prototype, {
                }
                html += this._get(inst, 'yearSuffix');
                if (showMonthAfterYear)
-                       html += ((secondary || changeMonth || changeYear) && (!(changeMonth && changeYear)) ? '&#xa0;' : '') + monthHtml;
+                       html += (secondary || !(changeMonth && changeYear) ? '&#xa0;' : '') + monthHtml;
                html += '</div>'; // Close datepicker_header
                return html;
        },