hi
I have a working Gantt chart, and trying to add a Marker, but the examples dont seem to work.
I added the dhtmlxgantt_marker.js by dragging it into the main part of the page, then
[code] var date_to_str = gantt.date.date_to_str(gantt.config.task_date);
var today = new Date(2015, 3, 5);
gantt.addMarker({
start_date: today,
css: “today”,
text: “Today”,
title: "Today: " + date_to_str(today)
});
var date_to_str = gantt.date.date_to_str(gantt.config.task_date);
var id = gantt.addMarker({ start_date: new Date(), css: "today", title: date_to_str(new Date()) });
setInterval(function () {
var today = gantt.getMarker(id);
today.start_date = new Date();
today.title = date_to_str(today.start_date);
gantt.updateMarker(id);
}, 1000 * 60);
[/code]
if I put this before the gantt.init(“gantt_here”);
gantt.parse(tasks);
then my gantt chart goes away, some flaw with no error message, so it works or its blank.
if i put this after then it has no effect. what does it need? how to make it work?