The onIncludeTimeCell event handler fires for each timeline cell while the JavaScript Scheduler builds the visible timeline. You can use it to hide selected time columns and to customize the start or end of included cells.
DayPilot.Scheduler.onIncludeTimeCell(args)args.cell.start (DayPilot.Date) - read/write cell start
args.cell.end (DayPilot.Date) - read/write cell end
args.cell.visible (boolean) - specifies whether this cell should be included in the timeline
This event handler is fired regardless of the DayPilot.Scheduler.showNonBusiness value.
Since version 2019.1.3572, you can adjust args.cell.start and args.cell.end. The cell must not overlap with other timeline cells.
JavaScript
const dp = new DayPilot.Scheduler("dp", {
onIncludeTimeCell: (args) => {
if (args.cell.start.getDayOfWeek() === 0) {
args.cell.visible = false;
}
},
// ...
});
dp.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
onIncludeTimeCell: (args) => {
if (args.cell.start.getDayOfWeek() === 0) {
args.cell.visible = false;
}
},
// ...
};React
<DayPilotScheduler
onIncludeTimeCell={onIncludeTimeCell}
{/* ... */}
/>const onIncludeTimeCell = (args) => {
if (args.cell.start.getDayOfWeek() === 0) {
args.cell.visible = false;
}
};Vue
<DayPilotScheduler
@includeTimeCell="onIncludeTimeCell"
<!-- ... -->
/>const onIncludeTimeCell = (args) => {
if (args.cell.start.getDayOfWeek() === 0) {
args.cell.visible = false;
}
};Hiding Time Columns [doc.daypilot.org]
Hiding Non-Business Hours [doc.daypilot.org]