Skip to content

Commit 9815c9e

Browse files
committed
Merge branch 'metadatasummary-crashes-for-dates' of Arnei/opencast-admin-interface into main
Pull request #1142 Fix event summary page crashing for dates
2 parents 22395ab + 381aaef commit 9815c9e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/components/events/partials/wizards/summaryTables/MetadataSummaryTable.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const MetadataSummaryTable = ({
1515
header
1616
}: {
1717
metadataCatalogs: MetadataCatalog[],
18-
formikValues: { [key: string]: string | string[] | boolean },
18+
formikValues: { [key: string]: string | string[] | boolean | Date },
1919
header: ParseKeys,
2020
}) => {
2121
const { t } = useTranslation();
@@ -55,6 +55,10 @@ const MetadataSummaryTable = ({
5555
)
5656
}
5757

58+
if (fieldValue instanceof Date) {
59+
fieldValue = t("dateFormats.dateTime.short", { dateTime: fieldValue })
60+
}
61+
5862
metadata = metadata.concat({
5963
name: metadataFields[i].id,
6064
label: metadataFields[i].label,

0 commit comments

Comments
 (0)