Fix date parsing

This commit is contained in:
Raimund Schlüßler 2018-11-08 20:56:23 +01:00
parent 76aecaf09a
commit 15cf127d48
No known key found for this signature in database
GPG key ID: 036FA7EB1A599178
2 changed files with 5 additions and 5 deletions

View file

@ -129,9 +129,9 @@ export default {
clickOutside
},
filters: {
formatDate: function(due) {
return valid(due)
? moment(due).calendar(null, {
formatDate: function(date) {
return valid(date)
? moment(date, 'YYYYMMDDTHHmmss').calendar(null, {
lastDay: t('tasks', '[Yesterday]'),
sameDay: t('tasks', '[Today]'),
nextDay: t('tasks', '[Tomorrow]'),

View file

@ -404,10 +404,10 @@ export default {
}
},
startDate: function() {
return moment(this.task.start).toDate()
return moment(this.task.start, 'YYYYMMDDTHHmmss').toDate()
},
dueDate: function() {
return moment(this.task.due).toDate()
return moment(this.task.due, 'YYYYMMDDTHHmmss').toDate()
}
},
mapState({