@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
4
4
import DayPicker from './DayPicker' ;
5
5
import { getModifiersForDay } from './ModifiersUtils' ;
6
- import { ESC , TAB } from './keys' ;
6
+ import { ESC } from './keys' ;
7
7
8
8
// When clicking on a day cell, overlay will be hidden after this timeout
9
9
export const HIDE_TIMEOUT = 100 ;
@@ -81,7 +81,6 @@ export default class DayPickerInput extends React.Component {
81
81
onFocus : PropTypes . func ,
82
82
onBlur : PropTypes . func ,
83
83
onKeyUp : PropTypes . func ,
84
- onKeyDown : PropTypes . func ,
85
84
} ;
86
85
87
86
static defaultProps = {
@@ -121,7 +120,6 @@ export default class DayPickerInput extends React.Component {
121
120
this . handleInputBlur = this . handleInputBlur . bind ( this ) ;
122
121
this . handleInputChange = this . handleInputChange . bind ( this ) ;
123
122
this . handleInputKeyUp = this . handleInputKeyUp . bind ( this ) ;
124
- this . handleInputKeyDown = this . handleInputKeyDown . bind ( this ) ;
125
123
this . handleDayClick = this . handleDayClick . bind ( this ) ;
126
124
}
127
125
@@ -336,16 +334,6 @@ export default class DayPickerInput extends React.Component {
336
334
this . updateState ( day , value ) ;
337
335
}
338
336
339
- handleInputKeyDown ( e ) {
340
- if ( e . keyCode === TAB ) {
341
- this . clickedInside = true ;
342
- }
343
- if ( this . props . inputProps . onKeyDown ) {
344
- e . persist ( ) ;
345
- this . props . inputProps . onKeyDown ( e ) ;
346
- }
347
- }
348
-
349
337
handleInputKeyUp ( e ) {
350
338
// Hide the overlay if the ESC key is pressed
351
339
this . setState ( { showOverlay : e . keyCode !== ESC } ) ;
@@ -465,7 +453,6 @@ export default class DayPickerInput extends React.Component {
465
453
onBlur = { this . handleInputBlur }
466
454
onKeyUp = { this . handleInputKeyUp }
467
455
onClick = { this . handleInputClick }
468
- onKeyDown = { this . handleInputKeyDown }
469
456
/>
470
457
{ this . state . showOverlay && this . renderOverlay ( ) }
471
458
</ div >
0 commit comments