diff --git a/README.md b/README.md index 228ed1ac59..7350443f59 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,7 @@ You can check [index.js](https://github.com/xgfe/react-native-datepicker/blob/ma | duration | 300 | `number` | Specify the animation duration of datepicker.| | customStyles | - | `number` | The hook of customize datepicker style, same as the native style. `dateTouchBody`, `dateInput`...| | showIcon | true | `boolean` | Controller whether or not show the icon | +| hideText | false | `boolean` | Controller whether or not show the `dateText` | | iconComponent | - | `element` | Set the custom icon | | disabled | false | `boolean` | Controller whether or not disable the picker | | is24Hour | - | `boolean` | Set the TimePicker is24Hour flag. The default value depend on `format`. Only work in Android | diff --git a/index.js b/index.js index b59f95bd1c..4b7de37d56 100644 --- a/index.js +++ b/index.js @@ -343,9 +343,14 @@ class DatePicker extends Component { onPress={this.onPressDate} > - - {this.getTitleElement()} - + { + !this.props.hideText ? + + {this.getTitleElement()} + + : + + } {this._renderIcon()} {Platform.OS === 'ios' &&