Browse Source

Fix gantt date format

pull/1/head
Wahyu Ramadhan 1 year ago
parent
commit
e8333090dc
  1. 35
      edit-mode/function/ganttConfig.js

35
edit-mode/function/ganttConfig.js

@ -280,24 +280,41 @@ var allColumns = [
{
name: "planned_start", label: "Baseline Start", align: "center", min_width: 80, editor: editor.planned_start, resize: true, template: function (text) {
if (!text.planned_start) {
return text.start_date;
return moment(text.start_date).format("DD-MM-YYYY");
}
return text.planned_start;
return moment(text.planned_start).format("DD-MM-YYYY");
}
},
{
name: "planned_end", label: "Baseline Finish", align: "center", min_width: 80, editor: editor.planned_end, resize: true, template: function (text) {
if (!text.planned_end) {
return text.end_date;
return moment(text.end_date).format("DD-MM-YYYY");
}
return text.planned_end;
return moment(text.planned_end).format("DD-MM-YYYY");
}
},
{ name: "start_date", label: "Early Start", align: "center", min_width: 80, editor: editor.start_date, resize: true },
{ name: "end_date", label: "Early Finish", align: "center", min_width: 80, editor: editor.end_date, resize: true },
{ name: "actual_start", label: "Actual Start", align: "center", min_width: 80, resize: true },
{ name: "actual_end", label: "Actual Finish", align: "center", min_width: 80, resize: true },
{ name: "start_date", label: "Early Start", align: "center", min_width: 80, editor: editor.start_date, resize: true, template: function (text) {
return moment(text.start_date).format("DD-MM-YYYY");
}
},
{ name: "end_date", label: "Early Finish", align: "center", min_width: 80, editor: editor.end_date, resize: true, template: function (text) {
return moment(text.end_date).format("DD-MM-YYYY");
}
},
{ name: "actual_start", label: "Actual Start", align: "center", min_width: 80, resize: true, template: function (text) {
if (!text.actual_start) {
return '';
}
return moment(text.actual_start).format("DD-MM-YYYY");
}
},
{ name: "actual_end", label: "Actual Finish", align: "center", min_width: 80, resize: true, template: function (text) {
if (!text.actual_end) {
return '';
}
return moment(text.actual_end).format("DD-MM-YYYY");
}
},
{
name: "bobot_planning", label: "Bobot (%)", align: "center", editor: editor.bobot_planning, resize: true, min_width: 115, template: function (text) {
let bobot = parseFloat(text.bobot_planning);

Loading…
Cancel
Save