From 2ff9fd04ae61587a239391187abb73c86209c578 Mon Sep 17 00:00:00 2001 From: Sine Jespersen Date: Tue, 30 Jul 2024 14:29:19 +0200 Subject: [PATCH] SUPP0RT-1586: remove some date manipulation --- src/components/util/schedule/schedule.jsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/util/schedule/schedule.jsx b/src/components/util/schedule/schedule.jsx index 731ff420..1fe93dbd 100644 --- a/src/components/util/schedule/schedule.jsx +++ b/src/components/util/schedule/schedule.jsx @@ -119,12 +119,9 @@ function Schedule({ schedules, onChange }) { * @param {object} target - Input target. */ const setDateValue = (scheduleId, target) => { - const date = target.valueAsDate; - const scheduleDate = new Date( - date.getTime() + 60 * 1000 * date.getTimezoneOffset() - ); + const date = new Date(target.value); - changeSchedule(scheduleId, target.id, scheduleDate); + changeSchedule(scheduleId, target.id, date); }; /**