BugiDev / BugiDev/react-native-calendar-strip

how do I combine multiple dates in datesBlacklist props?

Open
#334 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

I have some problem combining two forms of Date. What I mean is how do I achieve the blacklist date for all weekends and some dates on weekdays? Think this is as some people only work weekdays and their weekend is off. If they take some PTO during weekdays, I want to show them all together.

```
const datesBlacklistFunc = date => {
return date.isoWeekday() === 6; // disable Saturdays
}; // this will return all saturdays for many years
```

and

```
const datesBlacklist = [
{ start: '2021-12-25', end: '2021-12-25' },
{ start: '2021-12-31', end: '2021-12-31' },
];

```

I want to combine those two above situations in date Blacklist, any help will be appreciated?

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.