react-native-datepicker
react-native-datepicker copied to clipboard
Warning: componentWillReceivedProps has been renamed and is not recommended for use
Issue
componentWillReceivedProps has been renamed and is not recommended for use
Expected Behavior
It should work without any warnings ?
Code
<DatePicker
style={{width: 200}}
date={this.state.date}
mode="date"
placeholder="Select Date"
format="YYYY-MM-DD"
confirmBtnText="Confirm"
cancelBtnText="Cancel"
customStyles={{
dateIcon: {
position: 'absolute',
left: 0,
top: 4,
marginLeft: 0
},
dateInput: {
marginLeft: 36
}
// ... You can check the source to find the other keys.
}}
onDateChange={(date) => {this.setState({date: date})}}
/>
Also I got another warning that it has been merged to DatePickerIOS and will be removed in the future. Does that mean we cannot use it for Android anymore ?
datepicker.zip Try the attached file I created pull request to merge with master
@asibrahim1985 Thanks. But another warning still presents. "Warning: DatePickerIOS has been merged with DatePickerAndroid and will be removed in a future release. It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. See https://github.com/react-native-community/react-native-datetimepicker"
why this plugin is not updating?
Any help with this warning?