DayPilot Knowledge Base

AJAX Calendar/Scheduling Controls
DayPilot Pro (AJAX Calendar Control)
» DayPilot AJAX Calendar
DayPilot Pro (AJAX Monthly Calendar Control)
» DayPilot AJAX Monthly Calendar
DayPilot Pro (AJAX Scheduler Control)
» DayPilot AJAX 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 Set Up Overnight Shift Scheduling with DayPilot Calendar
List of CSS classes used in CssOnly mode (Calendar)