跳到主要内容

getTaskCalendar

Description

获取分配给指定任务的日历(任务级日历)

getTaskCalendar: (task: *string | number | object) => any

Parameters

  • task - (required) string | number | object - 任务的 ID 或对象

Returns

  • task_calendar - (object) - 该任务日历对象

Example

const task_calendar = gantt.getTaskCalendar({
"id":2,
"calendar_id":"custom",
"text":"Task #1",
"start_date":"02-04-2013",
"parent":"1",
"progress":0.5,
"open": true
});

gantt.getTaskCalendar(2);

Details

版本4.2中新增

上述示例返回的对象是一个 日历对象。如果 work_time 选项被禁用,该方法将返回启用 24/7 工作时间的日历对象。

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.