鼠标放在任务上显示信息框:
<script src="../../codebase/ext/dhtmlxgantt_tooltip.js?v=5.2.0"></script>
//添加竖线: <script src="../../codebase/ext/dhtmlxgantt_marker.js?v=5.2.0"></script> var date_to_str = gantt.date.date_to_str(gantt.config.task_date); //今日竖线 var today = new Date(2018, 3, 5); gantt.addMarker({ start_date: today, css: "today", text: "Today", title: "Today: " + date_to_str(today) }); //开始竖线 var start = new Date(2018, 2, 28); gantt.addMarker({ start_date: start, css: "status_line", text: "Start project", title: "Start project: " + date_to_str(start) });
//日期格式规则 gantt.config.date_scale = "%F, %Y";
gantt.config.scale_unit = "";
设置始终: gantt.config.start_date = new Date(2018, 02, 31); gantt.config.end_date = new Date(2018, 03, 09);