BugiDev / react-native-calendar-strip

Easy to use and visually stunning calendar component for React Native.
MIT License
936 stars 325 forks source link

Changes to blacklist/whitelist should force a refresh #258

Closed pjrule closed 3 years ago

pjrule commented 3 years ago

I am working on a project where whitelisted/blacklisted dates of a calendar strip are dynamic. In the current version of this component, changes to the whitelists and blacklists are not rendered until a CalendarDay element is clicked, which is rather confusing. This PR forces a componentwide refresh when these lists change.

I'm not sure if it's strictly necessary to recompute startingDate, selectedDate, and days.

peacechen commented 3 years ago

Thanks @pjrule Your PR looks spot on. Have you tested it successfully in your application?

pjrule commented 3 years ago

@peacechen Yes, I have!