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.umd.js CHANGED
@@ -10852,14 +10852,16 @@
10852
10852
  var dateFormat_1 = 'dd-MM-yyyy';
10853
10853
  var disabledDates_1 = disableCalendarDates.disabledDates;
10854
10854
  var _a = (disabledDates_1 || []).reduce(function (acc, dateRange) {
10855
+ var _a, _b;
10855
10856
  var formattedFromDate = format(dateRange.from, dateFormat_1);
10856
- var hasTwoOverlappingDates = disabledDates_1 === null || disabledDates_1 === void 0 ? void 0 : disabledDates_1.some(function (item) {
10857
- return format(item.from, dateFormat_1) === formattedFromDate &&
10858
- format(item.to, dateFormat_1) === formattedFromDate;
10857
+ var formattedToDate = format(dateRange.to, dateFormat_1);
10858
+ var hasTwoOverlappingDates = (_a = disableCalendarDates.availableDates) === null || _a === void 0 ? void 0 : _a.some(function (item) {
10859
+ return format(item.lastCheckOut, dateFormat_1) === formattedFromDate &&
10860
+ format(item.lastCheckOut, dateFormat_1) === formattedToDate;
10859
10861
  });
10860
- var hasOneOverlappingDate = disabledDates_1 === null || disabledDates_1 === void 0 ? void 0 : disabledDates_1.some(function (item) {
10861
- return format(item.from, dateFormat_1) === formattedFromDate &&
10862
- format(item.to, dateFormat_1) !== formattedFromDate;
10862
+ var hasOneOverlappingDate = (_b = disableCalendarDates.availableDates) === null || _b === void 0 ? void 0 : _b.some(function (item) {
10863
+ return format(item.lastCheckOut, dateFormat_1) === formattedFromDate &&
10864
+ format(item.lastCheckOut, dateFormat_1) !== formattedToDate;
10863
10865
  });
10864
10866
  if (hasTwoOverlappingDates) {
10865
10867
  acc.newOverlappingDates.push(dateRange);