includedDates would always disable excludedDates due to empty array (#3112)

pull/3113/head^2
Alex van Andel 2022-06-20 15:11:18 +01:00 committed by GitHub
parent 929c3a9a27
commit b004701601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ export const Day = ({
const Days = ({
minDate,
excludedDates = [],
includedDates = [],
includedDates,
browsingDate,
weekStart,
DayComponent = Day,
@ -96,7 +96,7 @@ const Days = ({
date={day}
onClick={() => props.onChange(day)}
disabled={
!includedDates.includes(yyyymmdd(day)) ||
(includedDates && !includedDates.includes(yyyymmdd(day))) ||
excludedDates.includes(yyyymmdd(day)) ||
day.valueOf() < minDateValueOf
}