Permalink
Browse files

Datepicker: removed conditional mozilla browser check block. Fixes #7…

…322 - Year selector disappears after setting an option in Firefox
  • Loading branch information...
1 parent 1845015 commit a6227be2c09da2c698ee6d5251ac113b90585522 Andrew Powell committed with scottgonzalez May 12, 2011
Showing with 4 additions and 9 deletions.
  1. +4 −9 ui/jquery.ui.datepicker.js
View
13 ui/jquery.ui.datepicker.js
@@ -707,7 +707,7 @@ $.extend(Datepicker.prototype, {
var origyearshtml = inst.yearshtml;
setTimeout(function(){
//assure that inst.yearshtml didn't change.
- if( origyearshtml === inst.yearshtml ){
+ if( origyearshtml === inst.yearshtml && inst.yearshtml ){
inst.dpDiv.find('select.ui-datepicker-year:first').replaceWith(inst.yearshtml);
}
origyearshtml = inst.yearshtml = null;
@@ -1606,14 +1606,9 @@ $.extend(Datepicker.prototype, {
'>' + year + '</option>';
}
inst.yearshtml += '</select>';
- //when showing there is no need for later update
- if( ! $.browser.mozilla ){
- html += inst.yearshtml;
- inst.yearshtml = null;
- } else {
- // will be replaced later with inst.yearshtml
- html += '<select class="ui-datepicker-year"><option value="' + drawYear + '" selected="selected">' + drawYear + '</option></select>';
- }
+
+ html += inst.yearshtml;
+ inst.yearshtml = null;
}
}
html += this._get(inst, 'yearSuffix');

0 comments on commit a6227be

Please sign in to comment.