]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: removed conditional mozilla browser check block. Fixes #7322 - Year selec...
authorAndrew Powell <andrew@shellcape.org>
Thu, 12 May 2011 15:28:37 +0000 (11:28 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 12 May 2011 15:29:13 +0000 (11:29 -0400)
(cherry picked from commit a6227be2c09da2c698ee6d5251ac113b90585522)

ui/jquery.ui.datepicker.js

index 996528937ea9fe8dbbd3b2a3d9d92eca661baf1c..93d468c36352383ddf66f154c1e7b1b25a15cfe7 100644 (file)
@@ -705,7 +705,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;
@@ -1602,14 +1602,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');