We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 22d44cf + 43c5f6f commit fe23c51Copy full SHA for fe23c51
src/modal/card-create-modal.ts
@@ -56,15 +56,18 @@ export class CardCreateModal extends Modal {
56
}
57
58
private onSave(): void {
59
- const dueDate = new Date(this.due.value).toISOString();
+ let dueDate: string | undefined;
60
+ if (this.due.value) {
61
+ dueDate = new Date(this.due.value).toISOString().toString();
62
+ }
63
64
this.plugin.api
65
.addNewCard({
66
idList: this.list.id,
67
idLabels: Object.values(this.selectedLabels).map((label) => label.id),
68
name: this.title.value,
69
desc: this.description.value,
- due: dueDate.toString(),
70
+ due: dueDate,
71
pos: this.position.value as CardPosition
72
})
73
.pipe(map((resp) => resp.response))
0 commit comments