Hello,
I'm trying to limit the list of calendars in the popup to the list of resources chosen in the config.
For instance :
- in resources there are 3 calendars available
( test 1, test 2, test 3 )
- in the config I want to display only the first two.
(test1, test2)
For the moment the popup when adding an event offers me the 3.
How to limit the display of only the two configured in the config?
resources: [{
field: 'calendar_id', title: 'Calendriers',
name: 'Calendriers', allowMultiple: false,
dataSource: calendars,
textField: 'name',
idField: 'id',
colorField: 'color'
}],
popupOpen: (args) => {
if (args.type == "QuickInfo") {
if (typeof args.data.id === 'undefined'){
var dialogObj = args.element.ej2_instances[0];
dialogObj.hide();
var currentAction = args.target.classList.contains("e-work-cells") ? "Add" : "Save";
scheduleObj.openEditor(args.data, currentAction);
}
}
if (args.type === 'Editor') {
let id = args.data.id;
if (id) {
let eventsById = [];
scheduleObj.eventsData.forEach(function (s) {
eventsById[s.id] = s
})
$(args.element).find(".e-start")[0].ej2_instances[0].value = eventsById[id].StartTime;
$(args.element).find(".e-end")[0].ej2_instances[0].value = eventsById[id].EndTime;
}
$(args.element).find(".e-time-zone-row,.e-time-zone,.e-recurrenceeditor").hide()
}
},
Thanks
Attachment:
printscreen_4fecb263.zip