diff --git a/htdocs/projet/ganttchart.inc.php b/htdocs/projet/ganttchart.inc.php index 1893415d718..4ce666085b9 100644 --- a/htdocs/projet/ganttchart.inc.php +++ b/htdocs/projet/ganttchart.inc.php @@ -90,9 +90,9 @@ if (g.getDivId() != null) var barText = "Resource"; var graphFormat = "day"; - g.setDateInputFormat('mm/dd/yyyy'); // Set format of input dates ('mm/dd/yyyy', 'dd/mm/yyyy', does not work with 'yyyy-mm-dd') - //g.setDateDisplayFormat(''); - g.setDateTaskDisplayFormat(''); + g.setDateInputFormat(''); // Set format of input dates ('mm/dd/yyyy', 'dd/mm/yyyy', does not work with 'yyyy-mm-dd') + g.setDateTaskTableDisplayFormat(''); // Format of date used into line + g.setDateTaskDisplayFormat(''); // Format of date used into popup, not into line g.setDayMajorDateDisplayFormat('dd mon'); g.setShowRes(1); // Show/Hide Responsible (0/1) g.setShowDur(1); // Show/Hide Duration (0/1) @@ -140,11 +140,13 @@ else */ function constructGanttLine($tarr,$task,$project_dependencies,$level=0,$project_id=null) { + global $dateformatinput2; + $start_date = $task["task_start_date"]; $end_date = $task["task_end_date"]; if (!$end_date) $end_date = $start_date; - $start_date = dol_print_date($start_date,"%m/%d/%Y"); - $end_date = dol_print_date($end_date,"%m/%d/%Y"); + $start_date = dol_print_date($start_date, $dateformatinput2); + $end_date = dol_print_date($end_date, $dateformatinput2); // Resources $resources = $task["task_resources"]; // Define depend (ex: "", "4,13", ...) diff --git a/htdocs/projet/ganttview.php b/htdocs/projet/ganttview.php index 29e9d0de1b4..40a3bbbad1c 100644 --- a/htdocs/projet/ganttview.php +++ b/htdocs/projet/ganttview.php @@ -268,7 +268,11 @@ if (count($tasksarray)>0) if (! empty($conf->use_javascript_ajax)) { //var_dump($_SESSION); - print '
'."\n"; + $dateformatinput='mm/dd/yyyy'; // How the date for data are formated + $dateformatinput2="%m/%d/%Y"; // How the date for data are formated + //var_dump($dateformatinput); + //var_dump($dateformatinput2); + print '
'."\n"; include_once DOL_DOCUMENT_ROOT.'/projet/ganttchart.inc.php'; print '
'."\n"; }