Skip to content

Commit 453936c

Browse files
hugofelpmmazzarolo
authored andcommitted
fix: comparing dates by value instead of objects (#248)
1 parent 90549ce commit 453936c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CustomDatePickerIOS.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default class CustomDatePickerIOS extends React.PureComponent {
6161
};
6262

6363
componentWillReceiveProps(nextProps) {
64-
if (this.props.date !== nextProps.date) {
64+
if (this.props.date.valueOf() !== nextProps.date.valueOf()) {
6565
this.setState({
6666
date: nextProps.date
6767
});

0 commit comments

Comments
 (0)