You can use BeforeCellRender event handler to highlight today.
JavaScript
dp.onBeforeCellRender = function(args) {
if (args.cell.start.getDatePart().getTime() === new DayPilot.Date().getDatePart().getTime()) {
args.cell.backColor = "silver";
}
};ASP.NET WebForms
protected void DayPilotCalendar1_BeforeCellRender(object sender, BeforeCellRenderEventArgs e)
{
if (e.Start.Date == DateTime.Today) {
e.BackgroundColor = "silver";
}
}ASP.NET MVC
protected override void OnBeforeCellRender(BeforeCellRenderArgs e)
{
if (e.Start.Date == DateTime.Today) {
e.BackgroundColor = "silver";
}
}Availability
Availability of this feature in DayPilot editions:
| Lite | Pro | |
|---|---|---|
| DayPilot for JavaScript | ||
| DayPilot for ASP.NET WebForms | ||
| DayPilot for ASP.NET MVC | ||
| DayPilot for Java |
DayPilot