wix / react-native-calendars

React Native Calendar Components 🗓️ 📆
MIT License
9.59k stars 2.96k forks source link

disabledByDefault combined with disableAllTouchEventsForDisabledDays not working for period marking type #2460

Open Jack-Gill-TH opened 6 months ago

Jack-Gill-TH commented 6 months ago

Description

When I use the Calendar props 'disabledByDefault' and 'disableAllTouchEventsForDisabledDays' together, I would expect the days which have been set to disabled by default not to register touch events. This works as expected when the marking type is dot, but not when the marking type is period.

Expected Behavior

Dates that have been disabled by default do not register touch events

Observed Behavior

They do register touch events - no error is reported.

Environment

This is reproducible in the react-native-calendars example project, in the Calendar playground.

Dots working:

https://github.com/wix/react-native-calendars/assets/37797332/3c9670d1-623e-4966-8f82-a92943a67438

Period not working:

https://github.com/wix/react-native-calendars/assets/37797332/d196a0bc-3ce5-4776-9ae7-f5dc9153af5c

I'm working on a fix for this and will open a PR soon.