diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index 21db0656c0e..23b5c47e474 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -1028,13 +1028,12 @@ class ExtraFields
// search filter on a date extrafield shows two inputs to select a date range
$prefill = array(
'start' => isset($value['start']) ? $value['start'] : '',
- 'end' => isset($value['end']) ? $value['end'] : '');
+ 'end' => isset($value['end']) ? $value['end'] : ''
+ );
$out = '
'
- . $langs->trans('From') . ' '
- . $form->selectDate($prefill['start'], $keyprefix . $key . $keysuffix . '_start', 0, 0, 1)
+ . $form->selectDate($prefill['start'], $keyprefix.$key.$keysuffix.'_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From"))
. '
'
- . $langs->trans('to') . ' '
- . $form->selectDate($prefill['end'], $keyprefix . $key . $keysuffix . '_end', 0, 0, 1)
+ . $form->selectDate($prefill['end'], $keyprefix.$key.$keysuffix.'_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"))
. '
';
} else {
// TODO Must also support $moreparam
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 11b654e9ef3..51aaa132c0e 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -5765,7 +5765,7 @@ class Form
$retstring .= '