[index.ts]
//........
//Start Date Calculation
let pStartDate = new Date("02/14/2019");
let today = new Date();
today.setHours(0, 0, 0, 0);
let diff = today.getTime() - pStartDate.getTime();
//End Date Calculation
let pEndDate = new Date(today);
pEndDate.setTime(pEndDate.getTime() + diff);
//........
let gantt: Gantt = new Gantt({
//........
projectStartDate: pStartDate,
projectEndDate: pEndDate,
eventMarkers: [
{
day: today,
label: "Today"
}
],
dataBound: function(args) {
if (args.hasOwnProperty("isGanttCreated")) {
this.scrollToDate(today);
}
}
//........ |