diff --git a/src/components/datepicker/bl-datepicker.test.ts b/src/components/datepicker/bl-datepicker.test.ts index 36703738..36a52247 100644 --- a/src/components/datepicker/bl-datepicker.test.ts +++ b/src/components/datepicker/bl-datepicker.test.ts @@ -265,8 +265,10 @@ describe("BlDatepicker", () => { it("should return an array of dates when value is an array of Dates", () => { const dates = [new Date("2024-01-01"), new Date("2024-02-01")]; + element.type=CALENDAR_TYPES.MULTIPLE; element.value = dates; - expect(element.value).to.deep.equal(dates); + + expect(element.value).to.equal(dates); }); it("should return undefined if value is not set", () => { diff --git a/src/mixins/datepicker-calendar-mixin/datepicker-calendar-mixin.ts b/src/mixins/datepicker-calendar-mixin/datepicker-calendar-mixin.ts index 7940053c..f4d4ce84 100644 --- a/src/mixins/datepicker-calendar-mixin/datepicker-calendar-mixin.ts +++ b/src/mixins/datepicker-calendar-mixin/datepicker-calendar-mixin.ts @@ -130,7 +130,7 @@ export default class DatepickerCalendarMixin extends LitElement { ); } else { this._value = value; - this._selectedDates.splice(0, this._selectedDates.length, ...tempVal); + this._selectedDates = tempVal; } }