Skip to content

Commit

Permalink
chore(calendar): fix broken test when using min date
Browse files Browse the repository at this point in the history
  • Loading branch information
DRiFTy17 committed Dec 14, 2023
1 parent 3af53f9 commit fc4167b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/calendar/calendar-foundation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,8 @@ export class CalendarFoundation implements ICalendarFoundation {
private _applyMin(): void {
this._adapter.toggleHostAttribute(CALENDAR_CONSTANTS.attributes.MIN, !!this._minAttribute, this._minAttribute as string);

if (this._min && this._min.getMonth() > this._month) {
if (this._min && (this._min.getMonth() > this._month || this._min.getFullYear() > this._year)) {
this._year = this._min.getFullYear();
this._month = this._min.getMonth();
}

Expand Down

0 comments on commit fc4167b

Please sign in to comment.