From d312efefddf7444a6202896c7766b158eb387ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Ch=C3=A1vez?= Date: Thu, 19 Jan 2023 17:02:06 -0600 Subject: [PATCH] set initialValue when date picker right is shown --- src/components/DatePicker/index.ios.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/DatePicker/index.ios.js b/src/components/DatePicker/index.ios.js index 6f37202cfadb..e1e03c36cdfa 100644 --- a/src/components/DatePicker/index.ios.js +++ b/src/components/DatePicker/index.ios.js @@ -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) { @@ -50,7 +52,6 @@ class DatePicker extends React.Component { listener.remove(); }); Keyboard.dismiss(); - this.initialValue = this.state.selectedDate; event.preventDefault(); }