Programmatically open/close date picker?
See original GitHub issueHi,
Is there a way to programmatically open/close the date picker from react-native-datetimepicker
?
My use case is creating a component based on TouchableOpacity
that opens the DatePicker when pressed (with a much bigger surface area than the tiny date picker).
RNDateTimePicker
does not seem to accept a ref
, nor to have an API to hide/show.
Thank you very much.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:14
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Programmatically open/close react-native-datetimepicker?
My use case is creating a component based on TouchableOpacity that opens the DatePicker when pressed (with a much bigger surface area than ......
Read more >New on the web: programmatically open a native date picker
The new `showPicker()` DOM methods enables developers to open a native date picker if the input element supports it.
Read more >[OutSystems UI] DatePicker in 2.8.3 - Refresh Input Value
I cannot understand how to refresh the date in the date picker input when you want to adjust its value programmatically. Example attached...
Read more >Programmatically open/close react-native-datetimepicker?
Coding example for the question Programmatically open/close ... return ( <View> <View> <Button onPress={showDatepicker} title="Show date picker!
Read more >Setting a Default Date | The Visual Developers Podcast
Integrating Flatpickr.js (a flexible, third-party datepicker) into your Webflow Project ... Using Javascript to Open/Close/Clear the Calendar ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
{show && <RNDateTimePicker />}
I needed this too. But my current workaround is to wrap
<DateTimePicker/>
inside an invisible<View/>
. The touch experience is not quite good, but it works though.Example: