You can use BeforeCellRender to customize cell properties:

  • HTML
  • Header HTML
  • Background color
  • CSS class
  • IsBusiness status

JavaScript

See also

Example

dp.onBeforeCellRender = function(args) {
  args.cell.html = "text";
  if (args.cell.start.getDay() === 1) {  // first day of month
      args.cell.backColor = "red";
  }
  args.cell.headerHtml = args.cell.start.toString("d. MMMM");  // customize the day cell header
};

ASP.NET WebForms

protected void DayPilotMonth1_BeforeCellRender(object sender, DayPilot.Web.Ui.Events.Month.BeforeCellRenderEventArgs e)
{
  e.CssClass = Week.WeekNrISO8601(e.Start)%2 == 0 ? "even" : "odd";
}

ASP.NET MVC

protected override void OnBeforeCellRender(BeforeCellRenderArgs e)
{
  e.CssClass = Week.WeekNrISO8601(e.Start)%2 == 0 ? "even" : "odd";
}