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 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

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

How to show the selected date using a Label control
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