willba-component-library 0.2.68 → 0.2.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.esm.js +9 -9
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +9 -9
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +9 -9
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FilterCalendar/hooks/useFilterCalendar.ts +7 -0
- package/src/core/components/calendar/Calendar.tsx +0 -1
- package/src/core/components/calendar/utils/calendarSelectionRules.tsx +2 -0
package/package.json
CHANGED
|
@@ -63,6 +63,13 @@ export const useFilterCalendar = ({
|
|
|
63
63
|
: [],
|
|
64
64
|
})
|
|
65
65
|
}
|
|
66
|
+
|
|
67
|
+
if (disabledDates && !!outerDisableCalendarDates?.disabledDates?.length) {
|
|
68
|
+
setDisabledDates({
|
|
69
|
+
...disabledDates,
|
|
70
|
+
...outerDisableCalendarDates.disabledDates,
|
|
71
|
+
})
|
|
72
|
+
}
|
|
66
73
|
}, [outerDisableCalendarDates])
|
|
67
74
|
|
|
68
75
|
// Handle Range Context initial selections
|
|
@@ -146,7 +146,6 @@ export const Calendar = forwardRef<HTMLDivElement, CalendarTypes>(
|
|
|
146
146
|
? disabledDatesByPage
|
|
147
147
|
: disabledDates?.length
|
|
148
148
|
? [
|
|
149
|
-
...(newDisableCalendarDates?.disabledDates || []),
|
|
150
149
|
lastPossibleCheckout && lastPossibleCheckout,
|
|
151
150
|
...disabledDates,
|
|
152
151
|
...firstPossibleRangeContextCheckIn,
|
|
@@ -193,6 +193,8 @@ const disableFutureDates = ({
|
|
|
193
193
|
// Will disable all dates before the check-in date
|
|
194
194
|
// { before: findCheckOutRange?.checkIn },
|
|
195
195
|
|
|
196
|
+
...(newDisableCalendarDates?.disabledDates || []),
|
|
197
|
+
|
|
196
198
|
{
|
|
197
199
|
from: noDatesRange ? undefined : checkIn,
|
|
198
200
|
to: noDatesRange ? undefined : firstCheckOut,
|