@@ -22,6 +22,8 @@ import {
2222} from './shared/dates' ;
2323import { isMaxDate , isMinDate } from './shared/propTypes' ;
2424
25+ const defaultMinDate = new Date ( - 8.64e15 ) ;
26+ const defaultMaxDate = new Date ( 8.64e15 ) ;
2527const allViews = [ 'hour' , 'minute' , 'second' ] ;
2628const className = 'react-datetime-picker__button__input' ;
2729
@@ -171,8 +173,8 @@ export default class DateTimeInput extends PureComponent {
171173 get commonInputProps ( ) {
172174 return {
173175 disabled : this . props . disabled ,
174- maxDate : this . props . maxDate ,
175- minDate : this . props . minDate ,
176+ maxDate : this . props . maxDate || defaultMaxDate ,
177+ minDate : this . props . minDate || defaultMinDate ,
176178 onChange : this . onChange ,
177179 onKeyDown : this . onKeyDown ,
178180 placeholder : '--' ,
@@ -437,8 +439,8 @@ export default class DateTimeInput extends PureComponent {
437439 < NativeInput
438440 key = "time"
439441 disabled = { this . props . disabled }
440- maxDate = { this . props . maxDate }
441- minDate = { this . props . minDate }
442+ maxDate = { this . props . maxDate || defaultMaxDate }
443+ minDate = { this . props . minDate || defaultMinDate }
442444 name = { this . props . name }
443445 onChange = { this . onChangeNative }
444446 required = { this . props . required }
0 commit comments