diff --git a/src/apps/opening-hours-editor/ConfirmAddRepeatedOpeningHour.tsx b/src/apps/opening-hours-editor/ConfirmAddRepeatedOpeningHour.tsx index ace984c31b..089d701a7e 100644 --- a/src/apps/opening-hours-editor/ConfirmAddRepeatedOpeningHour.tsx +++ b/src/apps/opening-hours-editor/ConfirmAddRepeatedOpeningHour.tsx @@ -1,21 +1,20 @@ import React from "react"; import { useText } from "../../core/utils/text"; import { OpeningHoursCategoriesType } from "./types"; +import { getDateString, getWeekDayName } from "./helper"; type ConfirmAddRepeatedOpeningHourType = { - startDateString: string; - weekDayName: string; + startDate: Date; category: OpeningHoursCategoriesType; startTime: string; endTime: string; - repeatedEndDate: string; + repeatedEndDate: Date; confirmSubmit: () => void; closeDialog: () => void; }; const ConfirmAddRepeatedOpeningHour = ({ - startDateString, - weekDayName, + startDate, category, startTime, endTime, @@ -51,15 +50,15 @@ const ConfirmAddRepeatedOpeningHour = ({ {t("openingHoursEventFormStartDateText")}: - {startDateString} + {getDateString(startDate)} {t("openingHoursEventFormEndDateText")}: - {repeatedEndDate} + {getDateString(repeatedEndDate)} {t("openingHoursEventFormEveryWeekdayText")}: - {weekDayName} + {getWeekDayName(startDate)} diff --git a/src/apps/opening-hours-editor/EventForm.tsx b/src/apps/opening-hours-editor/EventForm.tsx index ad1c0a7384..0c7310007e 100644 --- a/src/apps/opening-hours-editor/EventForm.tsx +++ b/src/apps/opening-hours-editor/EventForm.tsx @@ -86,12 +86,11 @@ const EventForm: React.FC = ({ if (repeatedEndDate) { openDialogWithContent( onSubmit(category, startTime, endTime, repeatedEndDate) }