Skip to content

Commit

Permalink
includedDates would always disable excludedDates due to empty array (c…
Browse files Browse the repository at this point in the history
  • Loading branch information
emrysal authored Jun 20, 2022
1 parent 929c3a9 commit b004701
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ui/booker/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const Day = ({
const Days = ({
minDate,
excludedDates = [],
includedDates = [],
includedDates,
browsingDate,
weekStart,
DayComponent = Day,
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit b004701

Please sign in to comment.