Skip to content

Commit

Permalink
fix: ios date picker not update date
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermelcdev committed Jul 27, 2022
1 parent 064ccdf commit 6a4fe2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DateTimePickerModal.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class DateTimePickerModal extends React.PureComponent {

static getDerivedStateFromProps(props, state) {
if (props.isVisible && !state.isPickerVisible) {
return { currentDate: props.date, isPickerVisible: true };
return { currentDate: new Date(), isPickerVisible: true };
}
return null;
}
Expand Down

0 comments on commit 6a4fe2d

Please sign in to comment.