DayPilot.Navigator.onBeforeCellRender

Fired before the day cell is rendered. You can use this event to customize the cell appearance.

Declaration

DayPilot.Navigator.onBeforeCellRender(args)

Parameters

  • args.cell.cssClass (string) - custom CSS class
  • args.cell.day (DayPilot.Date) - date of this cell
  • args.cell.html (string) - the cell HTML (read/write)
  • args.cell.isCurrentMonth (boolean) - true if this day belongs to the month being rendered
  • args.cell.isToday (boolean) - true if this is today (and the current month)
  • args.cell.isWeekend (boolean) - true if this day is a weekend day

Notes

Available since 8.1.1853.

Example

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