wix / react-native-calendars

React Native Calendar Components 🗓️ 📆
MIT License
9.52k stars 2.95k forks source link

subtractMonth function hangs when the current month is January while using 'Calendar' #2172

Open Hajarat opened 1 year ago

Hajarat commented 1 year ago

Description

Whenever I try to navigate to December from January using the subtractMonth function from onPressArrowLeft, The application freezes and my laptop starts to heat up as if the code is stuck in an infinite loop

Expected Behavior

I pressed on the left arrow while the calendar is on January, and while specifying onPressArrowLeft={subtractMonth => subtractMonth()} I expected the calendar to move to December of the previous year

Observed Behavior

The application freezes and my laptop starts to heat up as if the code is stuck in an infinite loop

Environment

Device/emulator/simulator & OS version: iOS simulator iPhone Xs - iOS 16.2

stale[bot] commented 1 year ago

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.