We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7ef5f6 commit e77b270Copy full SHA for e77b270
datepicker.js
@@ -50,11 +50,10 @@ class DatePicker extends Component {
50
this.setModalVisible = this.setModalVisible.bind(this);
51
}
52
53
- static getDerivedStateFromProps(nextProps, prevState) {
54
- if (nextProps.date !== prevState.date) {
55
- return ({date: nextProps.date});
+ componentWillReceiveProps(nextProps) {
+ if (nextProps.date !== this.props.date) {
+ this.setState({date: this.getDate(nextProps.date)});
56
57
- return null;
58
59
60
setModalVisible(visible) {
0 commit comments