react-native-calendars icon indicating copy to clipboard operation
react-native-calendars copied to clipboard

ArrowsHitSlop for Header

Open GaganpreetDeveloper opened this issue 1 year ago • 2 comments

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.

GaganpreetDeveloper avatar Jun 01 '23 06:06 GaganpreetDeveloper

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.

stale[bot] avatar Sep 17 '23 05:09 stale[bot]

I experienced the same issue.

atheck avatar Dec 18 '23 15:12 atheck