wix / react-native-calendars

React Native Calendar Components 🗓️ 📆
MIT License
9.33k stars 2.9k forks source link

ExpandableCalendar selected day automatically sets to first day of the week when scrolling back or forward #2281

Open longuyen10119 opened 12 months ago

longuyen10119 commented 12 months ago

Description

I'm current using Expandable Calendar and have this theme:

    selectedDayBackgroundColor: "yellow",
    selectedDayTextColor: "blue",
    // today
    todayTextColor: "yellow",

Screenshot 2023-07-13 at 3 40 23 PM

Expected Behavior

When scrolling back or forward, the first day of the week for some reason gets selected when nothing should be selected.

Observed Behavior

For context, the date when this issue is posted is July 13th (screenshot above) Screenshot 2023-07-13 at 3 41 57 PM

Environment

└── react-native-calendars@1.1299.0 └── react-native@0.70.6 macOS using iOS simulator iphone14 iOS 16.1

GaeCuure commented 11 months ago

Did you resolve this?

longuyen10119 commented 11 months ago

Not yet. Do you have a solution?

wconover1 commented 11 months ago

Running into this issue as well--any hope of a fix?

theol93 commented 9 months ago

Hi maybe this path helps you https://github.com/wix/react-native-calendars/issues/1937

hariharank6 commented 8 months ago

Facing this issue as well, a fix would be appreciated.

elie-chaaban commented 8 months ago

It s ok for me but the thing is I have a min date set to Today and I can swipe left and the first day of the previous week would be selected 🤦‍♂️

CostasCF commented 5 months ago

any solution to this issue?

CostasCF commented 5 months ago

@longuyen10119 did you resolve this? I am facing the same issue

vukadinFE commented 3 months ago

It may not be what you need, but there is one trade-off to this issue: disable a week scroll disableWeekScroll={true}.