Fix that "Track date only" cannot be tracked <> today (fixes #300)

This commit is contained in:
Bernd Bestel
2019-07-06 13:32:40 +02:00
parent 0c0e8c6957
commit 3fcede0b7c
2 changed files with 10 additions and 1 deletions

View File

@@ -21,7 +21,7 @@ class ChoresApiController extends BaseApiController
try
{
$trackedTime = date('Y-m-d H:i:s');
if (array_key_exists('tracked_time', $requestBody) && IsIsoDateTime($requestBody['tracked_time']))
if (array_key_exists('tracked_time', $requestBody) && (IsIsoDateTime($requestBody['tracked_time']) || IsIsoDate($requestBody['tracked_time'])))
{
$trackedTime = $requestBody['tracked_time'];
}