跳到主要内容

getTaskCalendar

Description

获取与特定任务关联的日历(任务级别设置的日历)

getTaskCalendar: (task: any) => 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中新增

上面示例中返回的对象对应于一个calendar object。当work_time选项关闭时,该方法默认返回一个配置为全天候24/7工作的日历。