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.
Declaration
DayPilot.Scheduler.onIncludeTimeCell(args)Parameters
args.cell.start(DayPilot.Date) - read/write cell startargs.cell.end(DayPilot.Date) - read/write cell endargs.cell.visible(boolean) - specifies whether this cell should be included in the timeline
Notes
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.
Examples
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;
}
};See Also
Hiding Time Columns [doc.daypilot.org]
Hiding Non-Business Hours [doc.daypilot.org]
DayPilot.Scheduler.showNonBusiness
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot