react-native-calendars
react-native-calendars copied to clipboard
ArrowsHitSlop for Header
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected]
for the project I'm working on.
HitSlop for Arrows in Calendar Header was not working so added arrowsHitSlop in props
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-calendars/src/calendar/index.js b/node_modules/react-native-calendars/src/calendar/index.js
index 6f46e8a..e076f4f 100644
--- a/node_modules/react-native-calendars/src/calendar/index.js
+++ b/node_modules/react-native-calendars/src/calendar/index.js
@@ -142,7 +142,7 @@ const Calendar = (props) => {
const ref = customHeader ? undefined : header;
const CustomHeader = customHeader;
const HeaderComponent = customHeader ? CustomHeader : CalendarHeader;
- return (<HeaderComponent {...headerProps} testID={`${testID}.header`} style={headerStyle} ref={ref} month={currentMonth} addMonth={addMonth} displayLoadingIndicator={shouldDisplayIndicator}/>);
+ return (<HeaderComponent {...headerProps} testID={`${testID}.header`} arrowsHitSlop={props.arrowsHitSlop} style={headerStyle} ref={ref} month={currentMonth} addMonth={addMonth} displayLoadingIndicator={shouldDisplayIndicator}/>);
};
const GestureComponent = enableSwipeMonths ? GestureRecognizer : View;
const swipeProps = {
This issue body was partially generated by patch-package.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I experienced the same issue.