From da54b945da38e1901e11d106f78e88df87328743 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sun, 6 Feb 2022 17:49:04 +0100 Subject: [PATCH] Fixed task edit page initial due date (fixes #1774) --- changelog/66_UNRELEASED_xxxx-xx-xx.md | 3 ++- views/taskform.blade.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog/66_UNRELEASED_xxxx-xx-xx.md b/changelog/66_UNRELEASED_xxxx-xx-xx.md index 3ee0cb20..1b247c77 100644 --- a/changelog/66_UNRELEASED_xxxx-xx-xx.md +++ b/changelog/66_UNRELEASED_xxxx-xx-xx.md @@ -14,5 +14,6 @@ - Fixed that the logout button/menu was missing when using external authentication (e.g. LDAP) - Fixed that the consume page/dialog wasn't properly initialized when opening it from the stock entries page - Fixed that entries for not existing users were missing on the stock journal -- Fixed that when having a Task without a due date, the iCal export was broken +- Fixed that when having a task without a due date, the iCal export was broken +- Fixed that when editing a task without a due date, `1970-01-01` was shown - The API endpoint `/stock/shoppinglist/clear` has now a new optional request body parameter `done_only` (to only remove done items from the given shopping list, defaults to `false`) diff --git a/views/taskform.blade.php b/views/taskform.blade.php index 1e38b99d..d34cc2d4 100644 --- a/views/taskform.blade.php +++ b/views/taskform.blade.php @@ -53,7 +53,7 @@ @php $initialDueDate = null; - if ($mode == 'edit') + if ($mode == 'edit' && !empty($task->due_date)) { $initialDueDate = date('Y-m-d', strtotime($task->due_date)); }