From 4b09b9832a95c74aafca7e25322e6e027e29e71b Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Tue, 26 Feb 2019 08:26:31 +0000 Subject: [PATCH] Task: fix allDay when a task doesn't have a startDate. --- src/pim-types.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/pim-types.ts b/src/pim-types.ts index 344d0ac..5e2b9dd 100644 --- a/src/pim-types.ts +++ b/src/pim-types.ts @@ -111,6 +111,10 @@ export class TaskType extends EventType { return undefined as any; } + get allDay() { + return !!((this.startDate && this.startDate.isDate) || (this.dueDate && this.dueDate.isDate)); + } + public clone() { const ret = new TaskType(new ICAL.Component(this.component.toJSON())); ret.color = this.color;