diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index c1e8abd18f2..6eb7a84ac25 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -7780,11 +7780,16 @@ class Form
if ($d) {
// Show date with popup
if ($usecalendar != 'combo') {
+ // Set formatted_date (for example: '%d/%m/%Y', '%m-%d-%y', ...
$formatted_date = '';
- //print "e".$set_time." t ".$conf->format_date_short;
if (strval($set_time) != '' && $set_time != -1) {
- //$formatted_date=dol_print_date($set_time,$conf->format_date_short);
- $formatted_date = dol_print_date($set_time, $langs->trans("FormatDateShortInput"), $gm); // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript
+ $reduceformat = (!empty($conf->dol_optimize_smallscreen) ? 1 : 0); // Test on original $format param.
+ if ($reduceformat) {
+ $format = str_replace('%Y', '%y', $langs->transnoentitiesnoconv("FormatDateShortInput")); // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript
+ } else {
+ $format = $langs->transnoentitiesnoconv("FormatDateShortInput"); // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript
+ }
+ $formatted_date = dol_print_date($set_time, $format, $gm); // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript
}
// Calendrier popup version eldy
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 698e2cbfa0c..ccdbe381d52 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -2086,7 +2086,7 @@ maxscreenheightless200 {
.maxwidth40 { max-width: 40px; }
.maxwidth50 { max-width: 50px; }
.maxwidth75 { max-width: 75px; }
-.maxwidthdate { max-width: 100px; }
+.maxwidthdate { max-width: 95px; }
.maxwidth100 { max-width: 100px; }
.maxwidth125 { max-width: 125px; }
.maxwidth150 { max-width: 150px; }
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 09665b46cf3..3b146dc5921 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -2215,7 +2215,7 @@ tr.nobottom td {
.maxwidth40 { max-width: 40px; }
.maxwidth50 { max-width: 50px; }
.maxwidth75 { max-width: 75px; }
-.maxwidthdate { max-width: 100px; }
+.maxwidthdate { max-width:95px; }
.maxwidth100 { max-width: 100px; }
.maxwidth125 { max-width: 125px; }
.maxwidth150 { max-width: 150px; }