From 573a402d05ace6c331314712ed3e1cc5e7ace0f1 Mon Sep 17 00:00:00 2001 From: Keith Wood Date: Sat, 6 Feb 2010 23:14:40 +0000 Subject: [PATCH] Datepicker: Separate month and year unless both are drop-downs --- ui/jquery.ui.datepicker.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; }, -- 2.39.5