Custom TouchableComponent does not bring up DatePicker on iOS.
I passed a custom component through the TouchableComponent prop. I get the onPress function inside my custom component and call it onPress. This works fine on Android, but on iOS, though I see the onPress function being sent in (some native code) and the onPress function being called, the date-picker doesn't come up.
<DatePicker
...
TouchableComponent={customTouchableComponent}
/>
customTouchableComponent = ({ onPress }) => (
<TouchableHighlight onPress={onPress}>
...
</TouchableHighlight>
);
Works on Android. Doesn't work on iOS.
not an overlap issue (zIndex, whatever) the onPress native code gets passed onPress gets triggered
+1
@arivanandan have you found a solution for this? Got the same problem.
I worked around the issues initially, by manually calling onPressDate which brings up the date modal and getting the date as usual through onDateChange.
I moved to react-native-calendars after that because I needed to disable date ranges and such.
I worked around the issues initially, by manually calling
onPressDatewhich brings up the date modal and getting the date as usual throughonDateChange.I supposed I moved to
react-native-calendarsafter that because I needed to disable date ranges and such.
Yes even I have worked around and created ready to use component for my use like this https://gist.github.com/ismusidhu/01d47c078955349df9473c41f5049a1d