Skip to content

Commit

Permalink
fix(kit): fix calendar range does not update checkbox position (#8481)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhd-dm authored Aug 12, 2024
1 parent 33c621f commit 301953f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ export class TuiCalendarRangeComponent implements TuiWithOptionalMinMax<TuiDay>
isItemActive(item: TuiDayRangePeriod | string): boolean {
const {activePeriod} = this;

return (tuiIsString(item) && activePeriod === null) || activePeriod === item;
return (
(tuiIsString(item) && activePeriod === null) ||
activePeriod === item ||
activePeriod?.toString() === item.toString()
);
}

// TODO: investigate if it is used anywhere and (if not) delete it in v4.0
Expand Down

0 comments on commit 301953f

Please sign in to comment.