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 highight day cells in DayPilot Month using CSS

How to highight day cells in DayPilot Month using CSS

Last revision: Jun 16, 2011

month-highlighted-day.png

It is possible to assign custom CSS classes to day cells using BeforeCellRender event:

   protected void DayPilotMonth1_BeforeCellRender(object sender, DayPilot.Web.Ui.Events.Month.BeforeCellRenderEventArgs e)
    {  
        e.CssClass = "first";
    }

This class name will be prefixed with CssClassPrefix value (if specified):

CssClassPrefix="month_"

See also:

Example

    protected void DayPilotMonth1_BeforeCellRender(object sender, DayPilot.Web.Ui.Events.Month.BeforeCellRenderEventArgs e)
    {  
        if (e.Start.Day == 1) {
            e.CssClass = "first";
        }
    }

DayPilotMonth properties:

CssClassPrefix="month_"

CSS:

.month_first {
  font-weight: bold;
}

Related

List of CSS classes used in CssOnly mode (Navigator)
How to implement Copy & Paste in the Calendar
How to customize 'Week N' string in the Scheduler header
Context menu uses no styling (only gray background)