Question: Cancel button?
bvelasquez opened this issue · 3 comments
bvelasquez commented
Is there a way to add a cancel button to the date selection? Currently, if the user does not select a date range, they just get an error.
Thank you!
mkausas commented
I'm also interested in this!
JeremyBradshaw7 commented
Yes it seems this important feature is missing.
Harkindey commented
This is how you close the modal with out selecting input.
Add a ref to the component and access the setModalVisible
customButton={(onConfirm) => (
<View style={{ flex: 1, marginHorizontal: 20, marginTop: -30 }}>
<Button
variant={'primary'}
buttonText="Select Range"
textColor={theme.primarySurface}
onPress={onConfirm}
/>
<Button
variant={'transparent'}
buttonText="Cancel"
textColor={theme.primaryColor}
onPress={() => ref.current.setModalVisible(false)}
/>
</View>
)}
/>