BugiDev / react-native-calendar-strip

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

How to update selected date when value of prop selectedDate has changed? #226

Closed auliakbarh closed 3 years ago

auliakbarh commented 3 years ago

How to update selected date when value of prop selectedDate has changed?

case: I have a screen using , a button and dateValue state. <CalendarStrip selectedDate={dateValue} ... /> my button changed the dateValue state, but component doesn't updated.

peacechen commented 3 years ago

The selectedDate prop may need to be added to the prop change detection. Would you mind submitting a PR? https://github.com/BugiDev/react-native-calendar-strip/blob/master/src/CalendarStrip.js#L145

peacechen commented 3 years ago

This has been fixed in 9cd6ab74ee37fc0884a14576a4e77524356dc501 and will be in the next release.