From cb55773bfeeee1388b7f43d5bd0aeceb70bb237e Mon Sep 17 00:00:00 2001 From: Julia Robles <48439828+juliarobles@users.noreply.github.com> Date: Thu, 19 Sep 2024 11:43:15 +0200 Subject: [PATCH] Added import of data by datetime range --- src/components/step2_ImportData.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/step2_ImportData.tsx b/src/components/step2_ImportData.tsx index 4ab033d..e84667e 100644 --- a/src/components/step2_ImportData.tsx +++ b/src/components/step2_ImportData.tsx @@ -181,7 +181,7 @@ export const ImportData: React.FC = ({ model, collections, addCollection, if (!newDisabled) newDisabledButton = !( (mode.value === ImportDataEnum.EXCEL && fileCSV !== undefined) || (mode.value === ImportDataEnum.DATETIME_VARIABLE_GRAFANA && selectedGrafanaVariable && selectedGrafanaVariable.value !== undefined) || - (mode.value === ImportDataEnum.DATETIME_RANGE && dateTimeInput !== undefined && dateTimeInputStart !== undefined) || + (mode.value === ImportDataEnum.DATETIME_RANGE && dateTimeInput !== undefined && dateTimeInputStart !== undefined && dateTimeInputStart.isBefore(dateTimeInput)) && !dateTimeInputStart.isSame(dateTimeInput) || (mode.value === ImportDataEnum.DATETIME_SET && dateTimeInput !== undefined)) } setDisabled(newDisabled)