Skip to content

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

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.

3 participants