From 169f95af337e8d81270b3b48fd7a47a90f0b2cac Mon Sep 17 00:00:00 2001 From: kolaente Date: Wed, 21 Sep 2022 22:18:35 +0200 Subject: [PATCH] fix(task wizard): creating new task --- src/services/task.ts | 4 ++-- src/views/tasks/CreateTask.vue | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/task.ts b/src/services/task.ts index bb41b685..15d2d21e 100644 --- a/src/services/task.ts +++ b/src/services/task.ts @@ -51,8 +51,8 @@ export default class TaskService extends AbstractService { model.startDate = parseDate(model.startDate) model.endDate = parseDate(model.endDate) model.doneAt = parseDate(model.doneAt) - model.created = formatISO(new Date(model.created)) - model.updated = formatISO(new Date(model.updated)) + model.created = +(model.created) ? parseDate(model.created) : null + model.updated = +(model.updated) ? parseDate(model.updated) : null // remove all nulls, these would create empty reminders for (const index in model.reminderDates) { diff --git a/src/views/tasks/CreateTask.vue b/src/views/tasks/CreateTask.vue index 9cf0e296..485f83f4 100644 --- a/src/views/tasks/CreateTask.vue +++ b/src/views/tasks/CreateTask.vue @@ -83,7 +83,7 @@ async function create() { newTask.value.listId = props.listId newTask.value.title = parsedTask.value.text const assignees = await findAssignees(parsedTask.value.assignees) - const dueDate = parsedTask.value.date !== null ? formatISO(parsedTask.date) : null + const dueDate = parsedTask.value.date !== null ? formatISO(parsedTask.value.date) : null const finalTask = new TaskModel({ ...newTask.value,