Agent-readable demo data
- Title
- Highlighting Today (Monthly Event Calendar) | DayPilot Pro for JavaScript Demo
- Tree
- DayPilot JavaScript Demo
- Catalog root
- Default
- Description
- Read more about day cell customization [doc.daypilot.org].
Inline demo script 1
const dp = new DayPilot.Month("dp", {
onTimeRangeSelected: async args => {
const modal = await DayPilot.Modal.prompt("New event name:", "Event");
dp.clearSelection();
if (modal.canceled) return;
dp.events.add({
start: args.start,
end: args.end,
id: DayPilot.guid(),
text: modal.result
});
dp.message("Created");
},
onBeforeCellRender: args => {
if (args.cell.start.getTime() === new DayPilot.Date().getDatePart().getTime()) {
args.cell.properties.areas = [
{right: 0, top: 0, left: 0, height: 6, backColor: "#e84949" }
];
}
}
});
dp.init();