diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php
index f51da1cb259..2dbbbd28084 100644
--- a/htdocs/comm/action/card.php
+++ b/htdocs/comm/action/card.php
@@ -904,33 +904,48 @@ if ($action == 'create')
// Full day
print '
| '.$langs->trans("EventOnFullDay").' | |
';
- // Date start
- $datep = ($datep ? $datep : $object->datep);
- if (GETPOST('datep', 'int', 1)) $datep = dol_stringtotime(GETPOST('datep', 'int', 1), 0);
- print '| '.$langs->trans("DateActionStart").' | ';
+ $datep = ($datep ? $datep : $object->datep);
+ if (GETPOST('datep', 'int', 1)) $datep = dol_stringtotime(GETPOST('datep', 'int', 1), 0);
+ $datef = ($datef ? $datef : $object->datef);
+ if (GETPOST('datef', 'int', 1)) $datef = dol_stringtotime(GETPOST('datef', 'int', 1), 0);
+ if (empty($datef) && !empty($datep))
+ {
+ if (GETPOST("actioncode", 'aZ09') == 'AC_RDV' || empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT)) {
+ $datef = dol_time_plus_duree($datep, (empty($conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS) ? 1 : $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS), 'h');
+ }
+ }
+
+ // Date start
+ print ' |
| ';
+ print ''.$langs->trans("DateActionStart").'';
+ print ' - ';
+ print ''.$langs->trans("DateActionEnd").'';
+ print ' | ';
if (GETPOST("afaire") == 1) {
print $form->selectDate($datep, 'ap', 1, 1, 0, "action", 1, 2, 0, 'fulldaystart'); // Empty value not allowed for start date and hours if "todo"
} else {
print $form->selectDate($datep, 'ap', 1, 1, 1, "action", 1, 2, 0, 'fulldaystart');
}
- print ' |
';
+ print ' - ';
+ //print ' - ';
+ if (GETPOST("afaire") == 1) {
+ print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend');
+ } else {
+ print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend');
+ }
+ print '';
// Date end
- $datef = ($datef ? $datef : $object->datef);
- if (GETPOST('datef', 'int', 1)) $datef = dol_stringtotime(GETPOST('datef', 'int', 1), 0);
- if (empty($datef) && !empty($datep))
- {
- if (GETPOST("actioncode", 'aZ09') == 'AC_RDV' || empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT)) {
- $datef = dol_time_plus_duree($datep, (empty($conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS) ? 1 : $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS), 'h');
- }
- }
- print '| '.$langs->trans("DateActionEnd").' | ';
+ /*print ' |
| ';
+ print ''.$langs->trans("DateActionEnd").'';
+ print ' | ';
+ print '';
if (GETPOST("afaire") == 1) {
print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend');
} else {
print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend');
}
- print ' |
';
+ print '';*/
// Dev in progress
$userepeatevent = ($conf->global->MAIN_FEATURES_LEVEL == 2 ? 1 : 0);