From 301953fa51eed0008778fc527d8cc477c0cfb0ca Mon Sep 17 00:00:00 2001 From: Demyan <64752156+zhd-dm@users.noreply.github.com> Date: Mon, 12 Aug 2024 20:34:59 +0300 Subject: [PATCH] fix(kit): fix calendar range does not update checkbox position (#8481) --- .../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