From: Keith Wood Date: Sat, 6 Feb 2010 23:14:40 +0000 (+0000) Subject: Datepicker: Separate month and year unless both are drop-downs X-Git-Tag: 1.8rc2~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=573a402d05ace6c331314712ed3e1cc5e7ace0f1;p=jquery-ui.git Datepicker: Separate month and year unless both are drop-downs --- diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 3c0b799a8..91f863ef9 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -1523,7 +1523,7 @@ $.extend(Datepicker.prototype, { var monthHtml = ''; // month selection if (secondary || !changeMonth) - monthHtml += '' + monthNames[drawMonth] + ' '; + monthHtml += '' + monthNames[drawMonth] + ''; else { var inMinYear = (minDate && minDate.getFullYear() == drawYear); var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear); @@ -1541,7 +1541,7 @@ $.extend(Datepicker.prototype, { monthHtml += ''; } if (!showMonthAfterYear) - html += monthHtml + ((secondary || changeMonth || changeYear) && (!(changeMonth && changeYear)) ? ' ' : ''); + html += monthHtml + (secondary || !(changeMonth && changeYear) ? ' ' : ''); // year selection if (secondary || !changeYear) html += '' + drawYear + ''; @@ -1572,7 +1572,7 @@ $.extend(Datepicker.prototype, { } html += this._get(inst, 'yearSuffix'); if (showMonthAfterYear) - html += ((secondary || changeMonth || changeYear) && (!(changeMonth && changeYear)) ? ' ' : '') + monthHtml; + html += (secondary || !(changeMonth && changeYear) ? ' ' : '') + monthHtml; html += ''; // Close datepicker_header return html; },