@colijnit/corecomponents_v12 256.1.0 → 256.1.1

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.
@@ -6871,8 +6871,12 @@
6871
6871
  return this._selectedDate;
6872
6872
  },
6873
6873
  set: function (date) {
6874
- this._selectedDate = !!date ? new Date(date.getFullYear(), date.getMonth(), date.getDate()) : date;
6875
- if (this.secondSelectedDate && date && this.secondSelectedDate.getTime() < this.selectedDate.getTime() && this.temporarySelectedSecondaryDate) {
6874
+ var _a, _b;
6875
+ if (date) {
6876
+ date = new Date(date);
6877
+ this._selectedDate = !!date ? new Date(date === null || date === void 0 ? void 0 : date.getFullYear(), date === null || date === void 0 ? void 0 : date.getMonth(), date === null || date === void 0 ? void 0 : date.getDate()) : date;
6878
+ }
6879
+ if (this.secondSelectedDate && date && ((_a = this.secondSelectedDate) === null || _a === void 0 ? void 0 : _a.getTime()) < ((_b = this.selectedDate) === null || _b === void 0 ? void 0 : _b.getTime()) && this.temporarySelectedSecondaryDate) {
6876
6880
  this.daysToHighlight = [];
6877
6881
  }
6878
6882
  },
@@ -7049,12 +7053,12 @@
7049
7053
  }
7050
7054
  };
7051
7055
  CalendarTemplateComponent.prototype.handleMouseOverDay = function (day) {
7052
- var _a, _b;
7056
+ var _c, _d;
7053
7057
  var _this = this;
7054
7058
  if (this.highlightDaysBetweenDates && day && (this.selectedDate || this.secondSelectedDate) && !(this.selectedDate && this.secondSelectedDate) && !(this.selectedDate && !this.temporarySelectedSecondaryDate && !this.secondSelectedDate)) {
7055
7059
  this.daysToHighlight = [];
7056
7060
  if (this.daysUnixTimestamps.includes(day.getTime())) {
7057
- (_a = this.daysToHighlight).push.apply(_a, __spreadArray([], __read(this.daysInMonth.map(function (dayInMonth) {
7061
+ (_c = this.daysToHighlight).push.apply(_c, __spreadArray([], __read(this.daysInMonth.map(function (dayInMonth) {
7058
7062
  if (_this.selectedDate) {
7059
7063
  if (dayInMonth &&
7060
7064
  // day in the month is after selected date and day in the month is before the hovering day
@@ -7074,7 +7078,7 @@
7074
7078
  }))));
7075
7079
  }
7076
7080
  else {
7077
- (_b = this.daysToHighlight).push.apply(_b, __spreadArray([], __read(this.daysInMonth.map(function (day) {
7081
+ (_d = this.daysToHighlight).push.apply(_d, __spreadArray([], __read(this.daysInMonth.map(function (day) {
7078
7082
  if (day > _this.selectedDate) {
7079
7083
  return day;
7080
7084
  }
@@ -7084,11 +7088,11 @@
7084
7088
  this.hoveringDate.next(day);
7085
7089
  };
7086
7090
  CalendarTemplateComponent.prototype._fillDatesBetweenSelected = function () {
7087
- var _a;
7091
+ var _c;
7088
7092
  var _this = this;
7089
7093
  if (this.selectedDate && this.secondSelectedDate) {
7090
7094
  this.daysToHighlight = [];
7091
- (_a = this.daysToHighlight).push.apply(_a, __spreadArray([], __read(this.daysInMonth.map(function (dayInMonth) {
7095
+ (_c = this.daysToHighlight).push.apply(_c, __spreadArray([], __read(this.daysInMonth.map(function (dayInMonth) {
7092
7096
  if (dayInMonth && (dayInMonth > _this.selectedDate && dayInMonth < _this.secondSelectedDate) || (dayInMonth > _this.secondSelectedDate && dayInMonth < _this.selectedDate)) {
7093
7097
  return dayInMonth;
7094
7098
  }