From 2ff9fd04ae61587a239391187abb73c86209c578 Mon Sep 17 00:00:00 2001 From: Sine Jespersen Date: Tue, 30 Jul 2024 14:29:19 +0200 Subject: [PATCH 1/2] 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); }; /** From d4ae479795ec78e6eb54052b744b96347dbfcc1b Mon Sep 17 00:00:00 2001 From: Sine Jespersen Date: Wed, 31 Jul 2024 09:49:18 +0200 Subject: [PATCH 2/2] SUPP0RT-1586: changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index efed948b..3bbe108f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. ## [Unreleased] + +- [#243](https://github.com/os2display/display-admin-client/pull/250) + - Fix null bug: replace valueAsDate with target.value as valueAsDate was null + - [#242](https://github.com/os2display/display-admin-client/pull/243) - Add entry in example config for midttrafik api key - Clean up multi select component a bit, replace reduce with Map logic