DayPilot.Scheduler.timeline

Array that specifies a custom scheduler timeline.

Item properties:

  • start (DayPilot.Date or string in ISO 8601 format)
  • end (DayPilot.Date or string in ISO 8601 format)
  • width (int; width in pixels; optional)

Example 1

dp.timeline = [
  { start: "2014-01-01T00:00:00", end: "2014-01-02T00:00:00" },
  { start: "2014-01-02T00:00:00", end: "2014-01-03T00:00:00" }
];

Example 2

dp.timeline = [];

for (var i = 0; i < 31; i++) {
  var day = {};
  day.start = dp.startDate.addDays(i);
  day.end = day.start.addDays(1);
  dp.timeline.push(day);
}

for (var i = 0; i < 3; i++) {
  var month = {};
  month.start = dp.startDate.addDays(31).addMonths(i);
  month.end = month.start.addMonths(1);
  month.width = 100;
  dp.timeline.push(month);
}

Main menu

DayPilot for JavaScript, ASP.NET WebForms, ASP.NET MVC, Java