From 70687f7955cb2471ad6df3a7806031245e5979cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 1 Aug 2011 15:28:37 -0400 Subject: [PATCH] Datepicker: Removed click handling for month and year dropdowns. Fixes #6198 - Datepicker Month and Year dropdowns in IE have to click twice. Thanks jdufresne --- ui/jquery.ui.datepicker.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 9f7f0b6e1..b125f9457 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -882,7 +882,6 @@ $.extend(Datepicker.prototype, { _selectMonthYear: function(id, select, period) { var target = $(id); var inst = this._getInst(target[0]); - inst._selectingMonthYear = false; inst['selected' + (period == 'M' ? 'Month' : 'Year')] = inst['draw' + (period == 'M' ? 'Month' : 'Year')] = parseInt(select.options[select.selectedIndex].value,10); @@ -890,18 +889,6 @@ $.extend(Datepicker.prototype, { this._adjustDate(target); }, - /* Restore input focus after not changing month/year. */ - _clickMonthYear: function(id) { - var target = $(id); - var inst = this._getInst(target[0]); - if (inst.input && inst._selectingMonthYear) { - setTimeout(function() { - inst.input.focus(); - }, 0); - } - inst._selectingMonthYear = !inst._selectingMonthYear; - }, - /* Action for selecting a day. */ _selectDay: function(id, month, year, td) { var target = $(id); @@ -1610,7 +1597,6 @@ $.extend(Datepicker.prototype, { var inMaxYear = (maxDate && maxDate.getFullYear() == drawYear); monthHtml += ''; for (; year <= endYear; year++) { inst.yearshtml += '