Skip to content

Commit a6227be

Browse files
Andrew Powellscottgonzalez
Andrew Powell
authored andcommitted
Datepicker: removed conditional mozilla browser check block. Fixes #7322 - Year selector disappears after setting an option in Firefox
1 parent 1845015 commit a6227be

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ $.extend(Datepicker.prototype, {
707707
var origyearshtml = inst.yearshtml;
708708
setTimeout(function(){
709709
//assure that inst.yearshtml didn't change.
710-
if( origyearshtml === inst.yearshtml ){
710+
if( origyearshtml === inst.yearshtml && inst.yearshtml ){
711711
inst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml);
712712
}
713713
origyearshtml = inst.yearshtml = null;
@@ -1606,14 +1606,9 @@ $.extend(Datepicker.prototype, {
16061606
'>' + year + '</option>';
16071607
}
16081608
inst.yearshtml += '</select>';
1609-
//when showing there is no need for later update
1610-
if( ! $.browser.mozilla ){
1611-
html += inst.yearshtml;
1612-
inst.yearshtml = null;
1613-
} else {
1614-
// will be replaced later with inst.yearshtml
1615-
html += '<select class="ui-datepicker-year"><option value="' + drawYear + '" selected="selected">' + drawYear + '</option></select>';
1616-
}
1609+
1610+
html += inst.yearshtml;
1611+
inst.yearshtml = null;
16171612
}
16181613
}
16191614
html += this._get(inst, 'yearSuffix');

0 commit comments

Comments
 (0)