dhtmlx Gantt知识点1
鼠标放在任务上显示信息框:
<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 = "";
![](https://img2018.cnblogs.com/blog/1544736/201904/1544736-20190413133249437-1485079037.png)
设置始终: gantt.config.start_date = new Date(2018, 02, 31); gantt.config.end_date = new Date(2018, 03, 09);
😘宝子:除非不再醒来,除非太阳不再升起,不然都请你好好生活,挣扎着前进,开心的笑。(●'◡'●)