react-native-datepicker
react-native-datepicker copied to clipboard
Without default 'date', the input display current date
Issue
With below props this.state.date = ''; //also the same when use 'null' value <DatePicker date={this.state.date} .../>
The text display current date instead of leaving the input blank. This made state inconstant with the input text.
Expected Behavior
For consistency between state and input, display it blank.
tested platform
: iOS
You must put placeholder prop to remove current date value in this case. It worked for me.
Just pass string with space
<DatePicker
date={this.state.date}
placeholder=" "
/>