Zum Hauptinhalt springen

start_date

Description

Legt den Startwert der Zeitachse fest

start_date: Date | undefined

Example

gantt.config.start_date = new Date(2027, 8, 10);
gantt.config.end_date = new Date(2027, 8, 20);

gantt.init("gantt_here");

Details

Hinweis

Um die start_date-Option anzuwenden, müssen Sie sie zusammen mit end_date verwenden.

In diesem Fall können wir den Bereich erweitern:

gantt.attachEvent("onLightboxSave", (taskId, task, isNew) => {
const taskStartDate = task.start_date;
const taskEndDate = task.end_date;
const scaleStartDate = gantt.config.start_date;
const scaleEndDate = gantt.config.end_date;

if (scaleStartDate > taskEndDate || scaleEndDate < taskStartDate) {
gantt.message({ type: "warning", text: "Warning! The task is outside the date range!", expire: 5000 });

return false;
}

return true;
});
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.