From 8cf03fc63cd8af5c542146d58d5127d56e7c67e2 Mon Sep 17 00:00:00 2001 From: Sine Jespersen Date: Wed, 31 Jul 2024 11:31:20 +0200 Subject: [PATCH 1/3] SUPP0RT-1586: fix date bug, remove valueAsDate as it is null --- src/components/util/schedule/schedule.jsx | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/components/util/schedule/schedule.jsx b/src/components/util/schedule/schedule.jsx index 731ff420..e12d036e 100644 --- a/src/components/util/schedule/schedule.jsx +++ b/src/components/util/schedule/schedule.jsx @@ -119,12 +119,8 @@ 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() - ); - - changeSchedule(scheduleId, target.id, scheduleDate); + const date = new Date(target.value); + changeSchedule(scheduleId, target.id, date); }; /** From de8779edd1fec718ab6d74f13862cead9cbdf3b6 Mon Sep 17 00:00:00 2001 From: Sine Jespersen Date: Wed, 31 Jul 2024 11:32:45 +0200 Subject: [PATCH 2/3] SUPP0RT-1586: changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43f3932c..282e9f75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +- [#243](https://github.com/os2display/display-admin-client/pull/251) + - Fix null bug: replace valueAsDate with target.value as valueAsDate was null ## [2.0.2] - 2024-04-25 From ea677ad012ae1b07108734c32a036fc182e7a63e Mon Sep 17 00:00:00 2001 From: Sine Jespersen Date: Thu, 1 Aug 2024 10:36:42 +0200 Subject: [PATCH 3/3] SUPP0RT-1586: release entry in changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 282e9f75..7d25b251 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] + +## [2.0.3] - 2024-08-01 - [#243](https://github.com/os2display/display-admin-client/pull/251) - Fix null bug: replace valueAsDate with target.value as valueAsDate was null