From 91fc2b046bf71a4efae81cb9d55cc564f223521e Mon Sep 17 00:00:00 2001 From: Bob Date: Sat, 23 May 2026 01:16:58 +0000 Subject: [PATCH 1/2] fix(vue3): replace datetime component with native datetime-local input in EventEditor --- src/components/EventEditor.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/EventEditor.vue b/src/components/EventEditor.vue index 0192f037c..379f4d577 100644 --- a/src/components/EventEditor.vue +++ b/src/components/EventEditor.vue @@ -13,10 +13,12 @@ b-modal(v-if="event && event.id", :id="'edit-modal-' + event.id", ref="eventEdit td {{ event.id }} tr th Start - datetime(type="datetime" v-model="start") + td + input(type="datetime-local" v-model="start") tr th End - datetime(type="datetime" v-model="end") + td + input(type="datetime-local" v-model="end") tr th Duration td {{ friendlyduration(editedEvent.duration) }} @@ -78,7 +80,7 @@ export default { computed: { start: { get: function () { - return moment(this.editedEvent.timestamp).format(); + return moment(this.editedEvent.timestamp).format('YYYY-MM-DDTHH:mm'); }, set: function (dt) { // Duration needs to be set first since otherwise the computed for end will use the new timestamp @@ -89,7 +91,7 @@ export default { end: { get: function () { const end = moment(this.editedEvent.timestamp).add(this.editedEvent.duration, 'seconds'); - return end.format(); + return end.format('YYYY-MM-DDTHH:mm'); }, set: function (dt) { this.editedEvent.duration = moment(dt).diff(this.editedEvent.timestamp, 'seconds'); From 0d77789ba3f57e264a2c8cc8205230ab6db94e6b Mon Sep 17 00:00:00 2001 From: TimeToBuildBob <223556219+Copilot@users.noreply.github.com> Date: Sat, 23 May 2026 01:24:39 +0000 Subject: [PATCH 2/2] fix(vue3): restore seconds precision in EventEditor datetime inputs Add step='1' to datetime-local inputs and use HH:mm:ss format strings to prevent silent truncation of seconds when editing event timestamps. Without this, any edit rounded timestamps to the nearest minute and corrupted duration arithmetic by up to 59 seconds. --- src/components/EventEditor.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/EventEditor.vue b/src/components/EventEditor.vue index 379f4d577..f33360301 100644 --- a/src/components/EventEditor.vue +++ b/src/components/EventEditor.vue @@ -14,11 +14,11 @@ b-modal(v-if="event && event.id", :id="'edit-modal-' + event.id", ref="eventEdit tr th Start td - input(type="datetime-local" v-model="start") + input(type="datetime-local" step="1" v-model="start") tr th End td - input(type="datetime-local" v-model="end") + input(type="datetime-local" step="1" v-model="end") tr th Duration td {{ friendlyduration(editedEvent.duration) }} @@ -80,7 +80,7 @@ export default { computed: { start: { get: function () { - return moment(this.editedEvent.timestamp).format('YYYY-MM-DDTHH:mm'); + return moment(this.editedEvent.timestamp).format('YYYY-MM-DDTHH:mm:ss'); }, set: function (dt) { // Duration needs to be set first since otherwise the computed for end will use the new timestamp @@ -91,7 +91,7 @@ export default { end: { get: function () { const end = moment(this.editedEvent.timestamp).add(this.editedEvent.duration, 'seconds'); - return end.format('YYYY-MM-DDTHH:mm'); + return end.format('YYYY-MM-DDTHH:mm:ss'); }, set: function (dt) { this.editedEvent.duration = moment(dt).diff(this.editedEvent.timestamp, 'seconds');