From c2f5db9d9c9b8da7df76616bc7a8bc9a785203ba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 31 Mar 2023 11:40:34 +0200 Subject: [PATCH] Better compatibility --- htdocs/core/class/html.form.class.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index fb4aa830ea0..0ef7115ba21 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5198,8 +5198,11 @@ class Form $more .= '
' . $input['label'] . '
'; $more .= '
'; $addnowlink = (empty($input['datenow']) ? 0 : 1); - $h = $input['hours'] ?: 0; - $m = $input['minutes'] ?: 0; + $h = $m = 0; + if ($input['type'] == 'datetime) { + $h = isset($input['hours']) ? $input['hours'] : 1; + $m = isset($input['minutes']) ? $input['minutes'] : 1; + } $more .= $this->selectDate($input['value'], $input['name'], $h, $m, 0, '', 1, $addnowlink); $more .= '
'."\n"; $formquestion[] = array('name'=>$input['name'].'day');