@@ -878,26 +878,13 @@ $.extend(Datepicker.prototype, {
878
878
_selectMonthYear : function ( id , select , period ) {
879
879
var target = $ ( id ) ;
880
880
var inst = this . _getInst ( target [ 0 ] ) ;
881
- inst . _selectingMonthYear = false ;
882
881
inst [ 'selected' + ( period == 'M' ? 'Month' : 'Year' ) ] =
883
882
inst [ 'draw' + ( period == 'M' ? 'Month' : 'Year' ) ] =
884
883
parseInt ( select . options [ select . selectedIndex ] . value , 10 ) ;
885
884
this . _notifyChange ( inst ) ;
886
885
this . _adjustDate ( target ) ;
887
886
} ,
888
887
889
- /* Restore input focus after not changing month/year. */
890
- _clickMonthYear : function ( id ) {
891
- var target = $ ( id ) ;
892
- var inst = this . _getInst ( target [ 0 ] ) ;
893
- if ( inst . input && inst . _selectingMonthYear ) {
894
- setTimeout ( function ( ) {
895
- inst . input . focus ( ) ;
896
- } , 0 ) ;
897
- }
898
- inst . _selectingMonthYear = ! inst . _selectingMonthYear ;
899
- } ,
900
-
901
888
/* Action for selecting a day. */
902
889
_selectDay : function ( id , month , year , td ) {
903
890
var target = $ ( id ) ;
@@ -1603,7 +1590,6 @@ $.extend(Datepicker.prototype, {
1603
1590
var inMaxYear = ( maxDate && maxDate . getFullYear ( ) == drawYear ) ;
1604
1591
monthHtml += '<select class="ui-datepicker-month" ' +
1605
1592
'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst . id + '\', this, \'M\');" ' +
1606
- 'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst . id + '\');"' +
1607
1593
'>' ;
1608
1594
for ( var month = 0 ; month < 12 ; month ++ ) {
1609
1595
if ( ( ! inMinYear || month >= minDate . getMonth ( ) ) &&
@@ -1637,7 +1623,6 @@ $.extend(Datepicker.prototype, {
1637
1623
endYear = ( maxDate ? Math . min ( endYear , maxDate . getFullYear ( ) ) : endYear ) ;
1638
1624
inst . yearshtml += '<select class="ui-datepicker-year" ' +
1639
1625
'onchange="DP_jQuery_' + dpuuid + '.datepicker._selectMonthYear(\'#' + inst . id + '\', this, \'Y\');" ' +
1640
- 'onclick="DP_jQuery_' + dpuuid + '.datepicker._clickMonthYear(\'#' + inst . id + '\');"' +
1641
1626
'>' ;
1642
1627
for ( ; year <= endYear ; year ++ ) {
1643
1628
inst . yearshtml += '<option value="' + year + '"' +
0 commit comments