DayPilot.Task Constructor

The DayPilot.Task constructor creates a Gantt task object from a raw data item.

Declaration

new DayPilot.Task(data)

Parameters

  • data (object) - raw task data with init properties

Notes

The supplied object is stored unchanged as the DayPilot.Task.data property.

Example

const task = new DayPilot.Task({
  id: DayPilot.guid(),
  start: DayPilot.Date.today(),
  end: DayPilot.Date.today().addHours(5),
  text: "New Task"
});

See Also

DayPilot.Task.data

DayPilot.Task Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript