diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index e6ef238d5026520563b7bc40019dc6d03cd5f50f..aae14dba217382083fa8118a7ed19d224385acb3 100755 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -627,6 +627,10 @@ class ExtraFields $formstat = new Form($db); $showtime = in_array($type,array('datetime')) ? 1 : 0; + // Do not show current date when field not required (see select_date() method) + if(!$required && $value == '') + $value = '-1'; + $out = $formstat->select_date($value, 'options_'.$key, $showtime, $showtime, $required, '', 1, 1, 1, 0, 1); //$out='<input type="text" name="options_'.$key.'" size="'.$showsize.'" maxlength="'.$newsize.'" value="'.$value.'"'.($moreparam?$moreparam:'').'>'; }