Search and Top Navigation
#7194 closed bug (duplicate)
Opened March 24, 2011 12:03AM UTC
Closed March 24, 2011 12:49PM UTC
Last modified March 24, 2011 12:49PM UTC
DatePicker year select dropdown has only one entry with multiple months showing
| Reported by: | kbwood | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.9.0 |
| Component: | ui.datepicker | Version: | 1.8.9 |
| Keywords: | Cc: | ||
| Blocked by: | Blocking: |
Description
This has been caused by the deferred update of the year drop-down to avoid flashes on Firefox.
Solution: wrap the generation of the ''inst.yearshtml'' property in ''_generateMonthYearHeader'' to only do it once.
// year selection
if (!inst.yearshtml) {
inst.yearshtml = '';
...
//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>';
}
}
}