@@ -331,6 +331,7 @@ class DatePicker extends Component {
331331 timeZoneOffsetInMinutes,
332332 cancelBtnText,
333333 confirmBtnText,
334+ TouchableComponent,
334335 testID,
335336 cancelBtnTestID,
336337 confirmBtnTestID
@@ -342,8 +343,6 @@ class DatePicker extends Component {
342343 disabled && customStyles . disabled
343344 ] ;
344345
345- const TouchableComponent = this . props . TouchableComponent ? this . props . TouchableComponent : TouchableHighlight ;
346-
347346 return (
348347 < TouchableComponent
349348 style = { [ Style . dateTouch , style ] }
@@ -444,35 +443,35 @@ DatePicker.defaultProps = {
444443 // whether or not show the icon
445444 showIcon : true ,
446445 disabled : false ,
446+ hideText : false ,
447447 placeholder : '' ,
448+ TouchableComponent : TouchableHighlight ,
448449 modalOnResponderTerminationRequest : e => true
449450} ;
450451
451- const { bool, element, func, instanceOf, number, object, oneOf, oneOfType, string} = PropTypes ;
452-
453452DatePicker . propTypes = {
454- mode : oneOf ( [ 'date' , 'datetime' , 'time' ] ) ,
455- androidMode : oneOf ( [ 'calendar' , 'spinner' , 'default' ] ) ,
456- date : oneOfType ( [ string , instanceOf ( Date ) ] ) ,
457- format : string ,
458- minDate : oneOfType ( [ string , instanceOf ( Date ) ] ) ,
459- maxDate : oneOfType ( [ string , instanceOf ( Date ) ] ) ,
460- height : number ,
461- duration : number ,
462- confirmBtnText : string ,
463- cancelBtnText : string ,
464- iconSource : oneOfType ( [ number , object ] ) ,
465- iconComponent : element ,
466- customStyles : object ,
467- showIcon : bool ,
468- disabled : bool ,
469- onDateChange : func ,
470- onOpenModal : func ,
471- onCloseModal : func ,
472- onPressMask : func ,
473- placeholder : string ,
474- modalOnResponderTerminationRequest : func ,
475- is24Hour : bool
453+ mode : PropTypes . oneOf ( [ 'date' , 'datetime' , 'time' ] ) ,
454+ androidMode : PropTypes . oneOf ( [ 'calendar' , 'spinner' , 'default' ] ) ,
455+ date : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . instanceOf ( Date ) ] ) ,
456+ format : PropTypes . string ,
457+ minDate : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . instanceOf ( Date ) ] ) ,
458+ maxDate : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . instanceOf ( Date ) ] ) ,
459+ height : PropTypes . number ,
460+ duration : PropTypes . number ,
461+ confirmBtnText : PropTypes . string ,
462+ cancelBtnText : PropTypes . string ,
463+ iconSource : PropTypes . oneOfType ( [ PropTypes . number , PropTypes . object ] ) ,
464+ iconComponent : PropTypes . element ,
465+ customStyles : PropTypes . object ,
466+ showIcon : PropTypes . bool ,
467+ disabled : PropTypes . bool ,
468+ onDateChange : PropTypes . func ,
469+ onOpenModal : PropTypes . func ,
470+ onCloseModal : PropTypes . func ,
471+ onPressMask : PropTypes . func ,
472+ placeholder : PropTypes . string ,
473+ modalOnResponderTerminationRequest : PropTypes . func ,
474+ is24Hour : PropTypes . bool
476475} ;
477476
478477export default DatePicker ;
0 commit comments