From ae058663476fdd7498b4b19096d68933059b6937 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Tue, 30 Jul 2024 08:49:02 +0300 Subject: [PATCH] UBERF-7721: fixed event display (#6175) Signed-off-by: Alexander Platov --- .../time-resources/src/components/PlanningCalendar.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/time-resources/src/components/PlanningCalendar.svelte b/plugins/time-resources/src/components/PlanningCalendar.svelte index 6580152a20..6edc976f34 100644 --- a/plugins/time-resources/src/components/PlanningCalendar.svelte +++ b/plugins/time-resources/src/components/PlanningCalendar.svelte @@ -35,8 +35,8 @@ return new Date(date).setHours(0, 0, 0, 0) } - function getTo (date: Date): Timestamp { - return new Date(date).setDate(date.getDate() + 3) + function getTo (date: Date, days: number = 3): Timestamp { + return new Date(date).setDate(date.getDate() + days) } let dayCalendar: DayCalendar @@ -58,7 +58,7 @@ }) $: from = getFrom(currentDate) - $: to = getTo(currentDate) + $: to = getTo(currentDate, displayedDaysCount) function update (calendars: Calendar[]): void { q.query( @@ -220,7 +220,7 @@