From 97516f47dc76ff490b2357c8b3e65c2607802996 Mon Sep 17 00:00:00 2001 From: daniele-mng Date: Mon, 24 Jun 2024 13:34:18 +0200 Subject: [PATCH] fix: dates inconsistencies in new task wizard and schedules --- src/gmp/commands/wizard.js | 2 +- src/gmp/models/event.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gmp/commands/wizard.js b/src/gmp/commands/wizard.js index 8b18062e88..2943bfb577 100644 --- a/src/gmp/commands/wizard.js +++ b/src/gmp/commands/wizard.js @@ -178,7 +178,7 @@ class WizardCommand extends HttpCommand { event_data_quick_task_fields, ); - event_data['event_data:start_day'] = start_date.day(); + event_data['event_data:start_day'] = start_date.date(); event_data['event_data:start_month'] = start_date.month() + 1; event_data['event_data:start_year'] = start_date.year(); diff --git a/src/gmp/models/event.js b/src/gmp/models/event.js index 3a1d814c9d..a413fcb494 100644 --- a/src/gmp/models/event.js +++ b/src/gmp/models/event.js @@ -3,7 +3,6 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ - import ical from 'ical.js'; import {v4 as uuid} from 'uuid'; @@ -305,7 +304,8 @@ class Event { } get duration() { - return createDuration({...this.event.duration}); + const {weeks, ...durationWithoutWeeks} = this.event.duration; + return createDuration(durationWithoutWeeks); } get durationInSeconds() {