From 50e118bea4d9917bf0e29d706457858c29f2f697 Mon Sep 17 00:00:00 2001 From: liuyongkai Date: Mon, 7 Nov 2022 07:16:14 +0000 Subject: [PATCH] * Resolve feedback #1380. --- module/programplan/view/gantt.html.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/module/programplan/view/gantt.html.php b/module/programplan/view/gantt.html.php index 6b1f88c074..59e2d962c5 100644 --- a/module/programplan/view/gantt.html.php +++ b/module/programplan/view/gantt.html.php @@ -564,6 +564,23 @@ $(function() if(showFields.indexOf('delay') != -1) gantt.config.columns.push({name: 'delay', align: 'center', resize: true, width: 60}); if(showFields.indexOf('delayDays') != -1) gantt.config.columns.push({name: 'delayDays', align: 'center', resize: false, width: 60}); + gantt.templates.task_end_date = function(data) + { + return gantt.templates.task_date(new Date(date.valueOf() - 1)); + } + var gridDateToStr = gantt.date.date_to_str("%Y-%m-%d"); + gantt.templates.grid_date_format = function(date, column) + { + if(column === "end_date") + { + return gridDateToStr(new Date(date.valueOf() - 1)); + } + else + { + return gridDateToStr(date); + } + } + endField = gantt.config.columns.pop(); endField.resize = false; gantt.config.columns.push(endField);