Skip to content

Commit

Permalink
fix(kit): fix CalendarRange switch month with maxLength
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlufy committed Aug 2, 2024
1 parent 864e50e commit 70c0d2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export class TuiPrimitiveCalendarRangeComponent implements OnInit {
return this.max;
}

if (month.monthBefore(this.min)) {
if (month.monthSameOrBefore(this.min)) {
return this.min.append({month: 1});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
[max]="max"
[min]="min"
[minViewedMonth]="cappedUserViewedMonthFirst | tuiMapper: monthOffset : 1"
[month]="userViewedMonthSecond.monthSameOrBefore(min) ? (min | tuiMapper: monthOffset : 1) : userViewedMonthSecond"
[month]="userViewedMonthSecond"
[showAdjacent]="false"
[value]="value"
[(hoveredItem)]="hoveredItem"
Expand Down

0 comments on commit 70c0d2e

Please sign in to comment.