fix(tasks): default reminder to current date
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:
kolaente 2024-12-06 15:13:19 +01:00
parent 1f55e3f866
commit e02ebbcba1
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 2 additions and 2 deletions

View File

@ -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)
}

View File

@ -92,7 +92,7 @@ function updateData() {
})
}
function addNewReminder(newReminder: ITaskReminder) {
function addNewReminder(newReminder: ITaskReminder|null) {
if (newReminder === null) {
return
}