Skip to content

Commit

Permalink
SUPP0RT-1586: fix date bug, remove valueAsDate as it is null
Browse files Browse the repository at this point in the history
  • Loading branch information
sinejespersen committed Jul 31, 2024
1 parent 5b117f8 commit 8cf03fc
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/components/util/schedule/schedule.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

/**
Expand Down

0 comments on commit 8cf03fc

Please sign in to comment.