willba-component-library 0.2.35 → 0.2.37
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 +8 -6
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +8 -6
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +8 -6
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/core/components/calendar/Calendar.tsx +15 -12
package/lib/index.esm.js
CHANGED
|
@@ -10830,14 +10830,16 @@ var Calendar = forwardRef(function (_a, ref) {
|
|
|
10830
10830
|
var dateFormat_1 = 'dd-MM-yyyy';
|
|
10831
10831
|
var disabledDates_1 = disableCalendarDates.disabledDates;
|
|
10832
10832
|
var _a = (disabledDates_1 || []).reduce(function (acc, dateRange) {
|
|
10833
|
+
var _a, _b;
|
|
10833
10834
|
var formattedFromDate = format(dateRange.from, dateFormat_1);
|
|
10834
|
-
var
|
|
10835
|
-
|
|
10836
|
-
|
|
10835
|
+
var formattedToDate = format(dateRange.to, dateFormat_1);
|
|
10836
|
+
var hasTwoOverlappingDates = (_a = disableCalendarDates.availableDates) === null || _a === void 0 ? void 0 : _a.some(function (item) {
|
|
10837
|
+
return format(item.lastCheckOut, dateFormat_1) === formattedFromDate &&
|
|
10838
|
+
format(item.lastCheckOut, dateFormat_1) === formattedToDate;
|
|
10837
10839
|
});
|
|
10838
|
-
var hasOneOverlappingDate =
|
|
10839
|
-
return format(item.
|
|
10840
|
-
format(item.
|
|
10840
|
+
var hasOneOverlappingDate = (_b = disableCalendarDates.availableDates) === null || _b === void 0 ? void 0 : _b.some(function (item) {
|
|
10841
|
+
return format(item.lastCheckOut, dateFormat_1) === formattedFromDate &&
|
|
10842
|
+
format(item.lastCheckOut, dateFormat_1) !== formattedToDate;
|
|
10841
10843
|
});
|
|
10842
10844
|
if (hasTwoOverlappingDates) {
|
|
10843
10845
|
acc.newOverlappingDates.push(dateRange);
|