From 89a6e964acf0c5c2c332a3b93ea847ae40f3569a Mon Sep 17 00:00:00 2001 From: Demyan Date: Mon, 12 Aug 2024 17:27:15 +0300 Subject: [PATCH] fix(kit): fix calendar range does not update checkbox position --- .../components/calendar-range/calendar-range.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/projects/kit/components/calendar-range/calendar-range.component.ts b/projects/kit/components/calendar-range/calendar-range.component.ts index 44ed3699af81..87ef136997fa 100644 --- a/projects/kit/components/calendar-range/calendar-range.component.ts +++ b/projects/kit/components/calendar-range/calendar-range.component.ts @@ -155,7 +155,11 @@ export class TuiCalendarRangeComponent implements TuiWithOptionalMinMax 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