diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 59d798413c2..61763c5af9a 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -7313,7 +7313,7 @@ class Form
}
// Note: We don't need monthNames, monthNamesShort, dayNames, dayNamesShort, dayNamesMin, they are set globally on datepicker component in lib_head.js.php
if (!getDolGlobalString('MAIN_POPUP_CALENDAR_ON_FOCUS')) {
- $buttonImage = $calendarpicto ?: DOL_MAIN_URL_ROOT . "/theme/" . dol_escape_js($conf->theme) . "/img/object_calendarday.png";
+ $buttonImage = $calendarpicto ?: DOL_URL_ROOT . "/theme/" . dol_escape_js($conf->theme) . "/img/object_calendarday.png";
$retstring .= "
showOn: 'button', /* both has problem with autocompletion */
buttonImage: '" . $buttonImage . "',