The cells can only be marked as disabled using the onBeforeCellRender event handler. This reactive design ensures the best performance of your app and prevents state synchronization issues.
You should be able to add a condition to the onBeforeCellRender event handler that identifies the column. For example, in the resource calendar mode (https://doc.daypilot.org/calendar/resources-view/) the column can be identified using the resource ID (+ the date if needed). In the standard week view (https://doc.daypilot.org/calendar/week-view/) you can use the date only.
Example:
const disabledResources = ["A", "B"];
const calendar = new DayPilot.Calendar("calendar", {
viewType: "Resources",
columns: [
{name: "A", id: "A"},
{name: "B", id: "B"},
{name: "C", id: "C"},
{name: "D", id: "D"},
{name: "E", id: "E"},
},
onBeforeCellRender: args => {
if (disabledResources.includes(args.cell.resource) {
args.cell.properties.disabled = true;
args.cell.properties.backColor = "#cccccc";
}
}
}
If you want to disable different column(s), you can change the "disabledResources" array and call calendar.update().