Перейти к основному содержимому

resource_calendars

информация

Эта функциональность доступна только в версии PRO.

Description

Определяет набор рабочих календарей, которые можно назначить конкретному ресурсу, например пользователю

resource_calendars: { [resourceId: string | number]: string | number | { [resourceId: string | number]: string | number | undefined } | undefined }

Example

gantt.config.resource_property = "user"
gantt.config.resource_calendars = {
1 : gantt.addCalendar({
worktime: {
days: [0, 1, 1, 1, 1, 1, 0]
}
})
};

// assigning the calendar to a particular task
{"id":3, user:"1", "text":"Task #2", "start_date":"11-04-2013",
"duration":"4", "parent":"1", "progress": 0.6, "open": true}

Значение по умолчанию: {}

Details

  • [resourceId: string | number] - (*string | number | {[resourceId: string | number]: string | number | undefined } | undefined } | undefined *) - сопоставление календаря ресурса

Before version 7.0, dhtmlxGantt used a slightly different format of resource_calendars.

The new way of assigning a working calendar to a user described above is easier and more convenient to use but the old configuration of the resource_calendars property will also work:

// adding a working calendar
var johnCalendarId = gantt.addCalendar({
worktime: {
days: [0, 1, 1, 1, 1, 1, 0]
}
}),

// binding the calendar to a user
gantt.config.resource_calendars = {
"user":{
1 : johnCalendarId
}
};
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.