How can I change the header date in the timeline view?

The date in the header always shows 1 March 2017 to 28th Feb 2018. I would like it to start at April and end in March instead. How can I change that?

Hello,

You need to use “{timelineName}_date” template.

scheduler.templates.timeline_date = function(date1, date2){
  if (date1.getDay()==date2.getDay() && date2-date1<(24*60*60*1000)){
            return scheduler.templates.day_date(date1);
  } else {
    date2 = scheduler.date.add(date2, 1, 'day'); 
    return scheduler.templates.week_date(date1, date2); 
  }
};

Timeline View Templates

Demo: docs.dhtmlx.com/scheduler/snippet/48e6bfc3

Perfect, thank you!