From d80082bc9b438ff0df1eaf69e184a16c0534bb10 Mon Sep 17 00:00:00 2001 From: "kartik.sharma" Date: Wed, 28 May 2025 16:03:35 +0530 Subject: [PATCH] Status code 400 showing on Logs tab and Daily Progress Report datepicker issue. --- src/components/common/DateRangePicker.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/common/DateRangePicker.jsx b/src/components/common/DateRangePicker.jsx index c56e742e..36fa61d8 100644 --- a/src/components/common/DateRangePicker.jsx +++ b/src/components/common/DateRangePicker.jsx @@ -12,7 +12,9 @@ const DateRangePicker = ({ onRangeChange, DateDifference = 7, defaultStartDate = const fp = flatpickr(inputRef.current, { mode: "range", - dateFormat: "d-m-Y", + dateFormat: "Y-m-d", // Format for backend (actual input value) + altInput: true, // Enables a visually different field + altFormat: "d-m-Y", defaultDate: [fifteenDaysAgo, today], static: true, clickOpens: true,