Skip to content

Commit

Permalink
fix(kit): range
Browse files Browse the repository at this point in the history
  • Loading branch information
mohan-mu authored and splincode committed Sep 10, 2024
1 parent 992389e commit 7d84f9f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class TuiCalendarRange implements OnInit, OnChanges {
?.pipe(tuiWatch(inject(ChangeDetectorRef)), takeUntilDestroyed())
.subscribe((value) => {
this.value = value;
this.defaultViewedMonth = this.value?.to || this.defaultViewedMonth;
this.defaultViewedMonth = this.value?.to ?? this.defaultViewedMonth;
});
}

Expand Down Expand Up @@ -179,7 +179,7 @@ export class TuiCalendarRange implements OnInit, OnChanges {
this.selectedActivePeriod = item;
this.updateValue(item.range.dayLimit(this.min, this.max));
this.itemChange.emit(item);
this.defaultViewedMonth = this.value?.to || this.defaultViewedMonth;
this.defaultViewedMonth = this.value?.to ?? this.defaultViewedMonth;
} else if (this.activePeriod !== null) {
this.selectedActivePeriod = null;
this.updateValue(null);
Expand Down

0 comments on commit 7d84f9f

Please sign in to comment.