Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/ios timepicker default date actually return the launch date #651

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guilhermeseckert
Copy link

Overview

Issue: #578

When using the time picker using an interval (for example 30 minutes), whenever the user clicks "OK" without changing the date, it return the locally cached time.

Test Plan

Tested on an internal company project on iOS simulator and device. Both worked.

@guilhermeseckert guilhermeseckert force-pushed the fix/ios-timepicker-default-date-actually-return-the-launch-date branch from ecdd5df to 6a4fe2d Compare July 27, 2022 22:46
@@ -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 };
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this change breaking the case where users change the initial date prop?

Copy link
Owner

@mmazzarolo mmazzarolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Unfortunately I this change breaks the case where users change the initial date prop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants