Skip to content

Commit ecc2fd4

Browse files
author
Solera
committed
Set currentDate to be prop.minimumDate if not null or the current date.
1 parent 56cc719 commit ecc2fd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DateTimePickerModal.ios.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export class DateTimePickerModal extends React.PureComponent {
7272

7373
static getDerivedStateFromProps(props, state) {
7474
if (props.isVisible && !state.isPickerVisible) {
75-
return { currentDate: props.date, isPickerVisible: true };
75+
return { currentDate: props.minimumDate ?? new Date(), isPickerVisible: true };
7676
}
7777
return null;
7878
}

0 commit comments

Comments
 (0)