From 7a1a9fbd9b80f3b92565ee657290a93e11ebd149 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 6 Feb 2026 16:45:18 +0530 Subject: [PATCH] fix: use correct property names from getActiveDateRange getActiveDateRange returns { start, end } not { startDate, endDate }. Also pass currentDate to avoid undefined date calculations. --- .../dashboard/components/ui/DatePicker/DatePicker.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/dashboard/components/ui/DatePicker/DatePicker.vue b/app/javascript/dashboard/components/ui/DatePicker/DatePicker.vue index b8e2636b0..d087cfc5c 100644 --- a/app/javascript/dashboard/components/ui/DatePicker/DatePicker.vue +++ b/app/javascript/dashboard/components/ui/DatePicker/DatePicker.vue @@ -122,10 +122,10 @@ watch( // If rangeType changes without dateRange, recompute dates from the range if (!newDateRange && newRangeType !== CUSTOM_RANGE) { - const activeDates = getActiveDateRange(newRangeType); + const activeDates = getActiveDateRange(newRangeType, currentDate.value); if (activeDates) { - selectedStartDate.value = startOfDay(activeDates.startDate); - selectedEndDate.value = endOfDay(activeDates.endDate); + selectedStartDate.value = startOfDay(activeDates.start); + selectedEndDate.value = endOfDay(activeDates.end); } } }