본문으로 건너뛰기

start_date

Description

타임 스케일의 시작 값을 설정합니다

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

노트

start_date 옵션을 적용하려면 end_date와 함께 사용해야 합니다.

이 경우 범위를 확장할 수 있습니다.

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.