Fix changing task dates (due/start/end/reminders)
continuous-integration/drone/push Build is passing Details

Fixes #71
This commit is contained in:
kolaente 2020-03-08 20:07:21 +01:00
parent ab8dd6f67a
commit a706089f7b
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 4 deletions

View File

@ -31,9 +31,9 @@ export default class TaskService extends AbstractService {
model.listID = Number(model.listID)
// Convert dates into an iso string
model.dueDate = model.dueDate === null ? null : formatISO(model.dueDate)
model.startDate = model.startDate === null ? null : formatISO(model.startDate)
model.endDate = model.endDate === null ? null : formatISO(model.endDate)
model.dueDate = model.dueDate === null ? null : formatISO(new Date(model.dueDate))
model.startDate = model.startDate === null ? null : formatISO(new Date(model.startDate))
model.endDate = model.endDate === null ? null : formatISO(new Date(model.endDate))
model.created = formatISO(model.created)
model.updated = formatISO(model.updated)
@ -47,7 +47,7 @@ export default class TaskService extends AbstractService {
// Make normal timestamps from js dates
if(model.reminderDates.length > 0) {
model.reminderDates = model.reminderDates.map(r => {
return formatISO(r)
return formatISO(new Date(r))
})
}