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

Set initialValue right after date picker is shown on iOS #14427

Merged
merged 1 commit into from
Jan 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/DatePicker/index.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class DatePicker extends React.Component {
* @param {Event} event
*/
showPicker(event) {
this.initialValue = this.state.selectedDate;

// Opens the popover only after the keyboard is hidden to avoid a "blinking" effect where the keyboard was on iOS
// See https://github.com/Expensify/App/issues/14084 for more context
if (!this.props.isKeyboardShown) {
Expand All @@ -50,7 +52,6 @@ class DatePicker extends React.Component {
listener.remove();
});
Keyboard.dismiss();
this.initialValue = this.state.selectedDate;
event.preventDefault();
}

Expand Down