From 6d69dde6715adc967a8a43bb42846ba9a1bd2ed8 Mon Sep 17 00:00:00 2001 From: Bhavin Ag Date: Mon, 17 Jan 2022 13:14:56 +0530 Subject: [PATCH] fix(date-range): show date format from the properties (#1733) --- frontend/src/Editor/Components/DaterangePicker.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/Editor/Components/DaterangePicker.jsx b/frontend/src/Editor/Components/DaterangePicker.jsx index 3959b29f93..44d998a51e 100644 --- a/frontend/src/Editor/Components/DaterangePicker.jsx +++ b/frontend/src/Editor/Components/DaterangePicker.jsx @@ -26,11 +26,11 @@ export const DaterangePicker = function DaterangePicker({ const end = dates.endDate; if (start) { - setExposedVariable('startDate', start.format(formatProp.value)); + setExposedVariable('startDate', start.format(formatProp)); } if (end) { - setExposedVariable('endDate', end.format(formatProp.value)); + setExposedVariable('endDate', end.format(formatProp)); } setStartDate(start); @@ -54,6 +54,7 @@ export const DaterangePicker = function DaterangePicker({ onFocusChange={(focus) => focusChanged(focus)} focusedInput={focusedInput} hideKeyboardShortcutsPanel={true} + displayFormat={formatProp} /> );