DayPilot Knowledge Base

AJAX Calendar/Scheduling Controls
DayPilot Pro (AJAX Calendar Control)
» DayPilot ASP.NET Calendar
DayPilot Pro (AJAX Monthly Calendar Control)
» DayPilot ASP.NET Monthly Calendar
DayPilot Pro (AJAX Scheduler Control)
» DayPilot ASP.NET Scheduler
DayPilot » Knowledge Base » How to define Calendar business and non-business days

How to define Calendar business and non-business days

Last revision: Feb 15, 2010

The default rules for determining business days in DayPilot Calendar are as follows:

If you need to define custom rules you have two options:


  protected void DayPilotCalendar1_BeforeCellRender(object sender, BeforeCellRenderEventArgs e)
        // Turn Saturday and Sunday into business days
        if ((e.Start.DayOfWeek == DayOfWeek.Saturday || e.Start.DayOfWeek == DayOfWeek.Sunday)
            || (e.Start.Hour >= DayPilotCalendar1.BusinessBeginsHour && e.Start.Hour < DayPilotCalendar1.BusinessEndsHour))
            e.IsBusiness = true;

Controls: Calendar


How to show business hours on weekends in Scheduler
How to combine column visibility and cell background to show business hours in the Scheduler
How to highlight busy days in DayPilot Navigator (ASP.NET WebForms)
How To Set Up Overnight Shift Scheduling with DayPilot Calendar