I have a form and I am using the datepicker for one of the fields. I would like to focus on the next element (which is a TextInput) and show up the keyboard after the user sets a date and click "Ok". Currently the focus is passed correctly but the keyboard won't pop up.
Expected Behavior
When calling the focus function inside the onCloseModal property the focus is correctly passed to the next element when the user hits the "Cancel" button.
When calling the focus function at the end of the code executed in the onDateChange property, the focus is correctly put on the next element but it doesn't pop up the keyboard.
Issue
I have a form and I am using the datepicker for one of the fields. I would like to focus on the next element (which is a TextInput) and show up the keyboard after the user sets a date and click "Ok". Currently the focus is passed correctly but the keyboard won't pop up.
Expected Behavior
When calling the focus function inside the onCloseModal property the focus is correctly passed to the next element when the user hits the "Cancel" button.
When calling the focus function at the end of the code executed in the onDateChange property, the focus is correctly put on the next element but it doesn't pop up the keyboard.
Code
onSubmitEditing
is a property passed from a component above which looks like the following:onSubmitEditing={() => this.inputR.email.focus()}
nextElementR
is a property passed from a component above which looks like the following:nextElementR={this.inputR.email}
Environment
react-native -v
: 2.0.1node -v
: 10.15.1npm -v
: 6.4.1target platform
: Android | iOSoperating system
: Windows 10