From e12e561008ff181ad28b7d2fea215017467df22c Mon Sep 17 00:00:00 2001
From: henrikmv <110386561+henrikmv@users.noreply.github.com>
Date: Tue, 8 Oct 2024 17:16:51 +0200
Subject: [PATCH] feat: [DHIS2-18081] Problem with date format when scheduling
an event (#3816)
---
.../ScheduleDate/ScheduleDate.component.js | 11 ++++++-----
.../ScheduleDate/scheduleDate.types.js | 3 ++-
.../WidgetEventSchedule.component.js | 3 ++-
.../WidgetEventSchedule.container.js | 18 ++++++++++++------
.../widgetEventSchedule.types.js | 2 ++
5 files changed, 24 insertions(+), 13 deletions(-)
diff --git a/src/core_modules/capture-core/components/WidgetEventSchedule/ScheduleDate/ScheduleDate.component.js b/src/core_modules/capture-core/components/WidgetEventSchedule/ScheduleDate/ScheduleDate.component.js
index 63e00adb9f..8b62978b24 100644
--- a/src/core_modules/capture-core/components/WidgetEventSchedule/ScheduleDate/ScheduleDate.component.js
+++ b/src/core_modules/capture-core/components/WidgetEventSchedule/ScheduleDate/ScheduleDate.component.js
@@ -5,7 +5,7 @@ import withStyles from '@material-ui/core/styles/withStyles';
import { DateField } from 'capture-core/components/FormFields/New';
import { InfoBox } from '../InfoBox';
import type { Props } from './scheduleDate.types';
-import { convertDateObjectToDateFormatString, convertStringToDateFormat } from '../../../utils/converters/date';
+import { convertStringToDateFormat } from '../../../utils/converters/date';
const styles = {
@@ -20,16 +20,17 @@ const styles = {
const ScheduleDatePlain = ({
scheduleDate,
+ serverScheduleDate,
setScheduleDate,
orgUnit,
- suggestedScheduleDate,
+ serverSuggestedScheduleDate,
eventCountInOrgUnit,
classes,
hideDueDate,
}: Props) => (<>
{!hideDueDate &&
{}}
@@ -39,8 +40,8 @@ const ScheduleDatePlain = ({
/>
}
void,
occurredAt: string,
eventData: Array