You can customize the day cell properties using BeforeCellRender event.

Properties that can be customized:

  • CSS class
  • HTML

JavaScript

Example:

html5-datepicker-navigator-custom-css.png

nav.onBeforeCellRender = function(args) {
  if (args.cell.isCurrentMonth) {
      args.cell.cssClass = "current-month";
  }
};

See also:

ASP.NET WebForms

Example

protected void DayPilotNavigator1_BeforeCellRender(object sender, DayPilot.Web.Ui.Events.Navigator.BeforeCellRenderEventArgs e)
{
  if (e.Start.DayOfWeek == DayOfWeek.Friday)
  {
      e.CssClass = "weekend";
  }
}

ASP.NET MVC

public class Dpn : DayPilotNavigator
{

    // ...

    protected override void OnBeforeCellRender(DayPilot.Web.Mvc.Events.Navigator.BeforeCellRenderArgs e)
    {
        if (e.Start == DateTime.Today.AddDays(1))
        {
            e.CssClass = "tomorrow";
        }
    }
}