From 827c9834e134a92d01126b670238a09bf9b4bab2 Mon Sep 17 00:00:00 2001 From: TeodoraPavlova <27234545+TeodoraPavlova@users.noreply.github.com> Date: Wed, 10 Apr 2024 15:18:52 +0300 Subject: [PATCH] Update frontend/src/components/inputs/DateTime.vue date conversion to more readable version Co-authored-by: Andreas Hasenkopf --- frontend/src/components/inputs/DateTime.vue | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/frontend/src/components/inputs/DateTime.vue b/frontend/src/components/inputs/DateTime.vue index c7cd1bc..bf5f3ce 100644 --- a/frontend/src/components/inputs/DateTime.vue +++ b/frontend/src/components/inputs/DateTime.vue @@ -30,13 +30,7 @@ export default { date = new Date(date) } - const year = date.getFullYear(); - const month = (date.getMonth() + 1).toString().padStart(2, "0"); - const day = date.getDate().toString().padStart(2, "0"); - const hours = date.getHours().toString().padStart(2, "0"); - const minutes = date.getMinutes().toString().padStart(2, "0"); - - return `${year}-${month}-${day}T${hours}:${minutes}:00`; + return date.toISOString().substring(0, 16); } }, };