Skip to content

Commit 6a4fe2d

Browse files
fix: ios date picker not update date
1 parent 064ccdf commit 6a4fe2d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DateTimePickerModal.ios.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class DateTimePickerModal extends React.PureComponent {
7070

7171
static getDerivedStateFromProps(props, state) {
7272
if (props.isVisible && !state.isPickerVisible) {
73-
return { currentDate: props.date, isPickerVisible: true };
73+
return { currentDate: new Date(), isPickerVisible: true };
7474
}
7575
return null;
7676
}

0 commit comments

Comments
 (0)