From d152fa84751a89cb81a3e790b89a357bfa2cfbad Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 2 Apr 2026 18:55:13 +0200 Subject: [PATCH] fix(gantt): use reactive date range in Flatpickr config to prevent reset on task update Replace static initialDateRange snapshot with reactive filters.value references inside the computed flatPickerConfig. This ensures the Flatpickr defaultDate always reflects the current user-selected range instead of the mount-time values. Ref #2462 --- frontend/src/components/project/views/ProjectGantt.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/components/project/views/ProjectGantt.vue b/frontend/src/components/project/views/ProjectGantt.vue index c706395b4..8422d503a 100644 --- a/frontend/src/components/project/views/ProjectGantt.vue +++ b/frontend/src/components/project/views/ProjectGantt.vue @@ -146,13 +146,11 @@ const flatPickerDateRange = computed({ }, }) -const initialDateRange = [filters.value.dateFrom, filters.value.dateTo] - const {t} = useI18n({useScope: 'global'}) const flatPickerConfig = computed(() => ({ altFormat: t('date.altFormatShort'), altInput: true, - defaultDate: initialDateRange, + defaultDate: [filters.value.dateFrom, filters.value.dateTo], enableTime: false, mode: 'range', locale: useFlatpickrLanguage().value,