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
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot