BugiDev / react-native-calendar-strip

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

Error on android when using datesBlackList #305

Open maxgenest opened 3 years ago

maxgenest commented 3 years ago

When I use datesBlackList prop I have a "Cannot read property scrollToIndex of undefined" error on android. Everything works fine on iOS.

My datesBlackList :

const datesBlacklist = [
  {
    start: moment().subtract(1, 'week'),
    end: moment().subtract(1, 'day'),
  },
];
Capture d’écran 2021-06-25 à 13 58 47

Fix proposed : add a && this.rlv condition in Scroller.js line 145

if (this.state.data[i].date.isSame(targetDate, "day") && this.rlv)