You can hide selected time columns using the onIncludeTimeCell
event handler.
JavaScript
See also DayPilot.Scheduler.onIncludeTimeCell.
<div id="dp"></div>
<script type="text/javascript">
var dp = new DayPilot.Scheduler("dp");
dp.onIncludeTimeCell = function(args) {
if (args.cell.start.getDayOfWeek() === 0) { // hide Sundays
args.cell.visible = false;
}
/*
* available:
*
* args.cell.start
* args.cell.end
* args.cell.visible
*/
};
// ...
dp.init();
</script>
ASP.NET WebForms
In ASP.NET WebForms, you can hide columns using IncludeCell
event handler:
protected void DayPilotScheduler1_IncludeCell(object sender, IncludeCellEventArgs e)
{
// hiding lunch break
if (e.Start.Hour == 13)
{
e.Visible = false;
}
}
ASP.NET MVC
In ASP.NET MVC, you can hide columns using OnIncludeCell
event handler:
protected override void OnIncludeCell(IncludeCellArgs e)
{
// hiding lunch break
if (e.Start.Hour == 13)
{
e.Visible = false;
}
}