fix(tasks): default reminder to current date
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This fixes an issue where the default date for a new reminder was 1970-01-01 (unix timestamp 0). It was caused by a new date object being created but since the reminder that was creatd was new, this was created as null date, which equals a 0 unix timestamp. Resolves https://github.com/go-vikunja/vikunja/issues/359
This commit is contained in:
parent
1f55e3f866
commit
e02ebbcba1
@ -144,7 +144,7 @@ watch(
|
||||
if (newReminder) {
|
||||
reminder.value = newReminder
|
||||
|
||||
if (newReminder.relativeTo === null) {
|
||||
if (newReminder.relativeTo === null && newReminder.reminder !== null) {
|
||||
reminderDate.value = new Date(newReminder.reminder)
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ function updateData() {
|
||||
})
|
||||
}
|
||||
|
||||
function addNewReminder(newReminder: ITaskReminder) {
|
||||
function addNewReminder(newReminder: ITaskReminder|null) {
|
||||
if (newReminder === null) {
|
||||
return
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user