From 9cc11f0a28e74872df11c0cdee94e4e25a67c704 Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 16 Jul 2024 10:18:28 +0200 Subject: [PATCH] variable --- src/components/common/VnInputTime.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/common/VnInputTime.vue b/src/components/common/VnInputTime.vue index 0971facf9a..31ac7c04f6 100644 --- a/src/components/common/VnInputTime.vue +++ b/src/components/common/VnInputTime.vue @@ -49,9 +49,9 @@ const formattedTime = computed({ time = time.substring(0, 2) + ':' + time.substring(3, 5); } if (!props.timeOnly) { - const hours = time.split(':'); + const [hh, mm] = time.split(':'); const date = new Date(model.value ? model.value : null); - date.setHours(hours[0] ?? 0, hours[1] ?? 0, 0); + date.setHours(hh, mm, 0); time = date?.toISOString(); } }