From cbd520e999fc47ba0a05f84ce041c773a3e33a40 Mon Sep 17 00:00:00 2001 From: Niko Reunanen Date: Sat, 1 Mar 2025 09:42:50 +0200 Subject: [PATCH] Show date in the entry time format --- front-end/src/components/EntryTable.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/front-end/src/components/EntryTable.vue b/front-end/src/components/EntryTable.vue index f6896ab..3a794f7 100644 --- a/front-end/src/components/EntryTable.vue +++ b/front-end/src/components/EntryTable.vue @@ -149,13 +149,13 @@ function getDateFmt(date: Date | null): string { return ""; } - const hour = date.getHours(); - const minute = date.getMinutes(); + const year = date.getFullYear(); + const month = `0${date.getMonth()}`.slice(-2); + const date_str = date.getDate(); + const hour = `0${date.getHours()}`.slice(-2); + const minute = `0${date.getMinutes()}`.slice(-2); - const hh = `0${hour.toString()}`.slice(-2); - const mm = `0${minute.toString()}`.slice(-2); - - return `${hh}:${mm}`; + return `${hour}:${minute} ${date_str}/${month}/${year}`; } async function save(event: DataTableRowEditSaveEvent) { @@ -265,7 +265,7 @@ function projectTitleFormat(project: Project, titleLimit: number): string { {{ getDateFmt(slotProps.data.start) }} @@ -273,7 +273,7 @@ function projectTitleFormat(project: Project, titleLimit: number): string { {{ getDateFmt(slotProps.data.end) }}