aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.datepicker.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-08-01 15:28:37 -0400
committerScott González <scott.gonzalez@gmail.com>2011-08-01 15:28:37 -0400
commit70687f7955cb2471ad6df3a7806031245e5979cd (patch)
tree022cc12a096a1ea6f406ee3fa1421cbd9542baa4 /ui/jquery.ui.datepicker.js
parent350e4ab5b854d2f6aca22d5202c03dcbf59ff4aa (diff)
downloadjquery-ui-70687f7955cb2471ad6df3a7806031245e5979cd.tar.gz
jquery-ui-70687f7955cb2471ad6df3a7806031245e5979cd.zip
Datepicker: Removed click handling for month and year dropdowns. Fixes #6198 - Datepicker Month and Year dropdowns in IE have to click twice.
Thanks jdufresne
Diffstat (limited to 'ui/jquery.ui.datepicker.js')
-rw-r--r--ui/jquery.ui.datepicker.js15
1 files changed, 0 insertions, 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 += '<select class="ui-datepicker-month" ' +
'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'M\');" ' +
- 'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
'>';
for (var month = 0; month < 12; month++) {
if ((!inMinYear || month >= minDate.getMonth()) &&
@@ -1644,7 +1630,6 @@ $.extend(Datepicker.prototype, {
endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
inst.yearshtml += '<select class="ui-datepicker-year" ' +
'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst.id + '\', this, \'Y\');" ' +
- 'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst.id + '\');"' +
'>';
for (; year <= endYear; year++) {
inst.yearshtml += '<option value="' + year + '"' +