From 522c138093972f586bf0f72bff322c7b8d33b702 Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Thu, 25 Jul 2024 17:02:26 +0200 Subject: [PATCH] fix: reset seconds to 0 when manually editing --- ui/src/timespan/TimeSpan.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/src/timespan/TimeSpan.tsx b/ui/src/timespan/TimeSpan.tsx index 277e866..02307b3 100644 --- a/ui/src/timespan/TimeSpan.tsx +++ b/ui/src/timespan/TimeSpan.tsx @@ -183,6 +183,7 @@ export const TimeSpan: React.FC = React.memo( if (!newFrom.isValid()) { return; } + newFrom.set({second: 0}); if (to && moment(newFrom).isAfter(to)) { const newTo = moment(newFrom).add(15, 'minute'); noteAwareUpdateTimeSpan({ @@ -217,6 +218,7 @@ export const TimeSpan: React.FC = React.memo( if (!newTo.isValid()) { return; } + newTo.set({second: 0}); if (moment(newTo).isBefore(from)) { const newFrom = moment(newTo).subtract(15, 'minute'); noteAwareUpdateTimeSpan({