BugiDev / BugiDev/react-native-calendar-strip

Error on android when using datesBlackList

Open
#305 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
976
Forks
336
PR merge metrics
No merged PRs in 30d

Description

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)
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.