You can customize the event color globally using CSS or individually using BeforeEventRender event handler.
JavaScript
Add backColor property to DayPilot.Event.data:
<div id="dp"></div> <script type="text/javascript"> var dp = new DayPilot.Month("dp"); dp.events.list = [ { start: "2013-03-25T00:00:00", end: "2013-03-25T12:00:00", id: "123", resource: "A", text: "Event", backColor: "#cccccc" } ] // ... dp.init(); </script>
ASP.NET WebForms
protected void DayPilotMonth1_BeforeEventRender(object sender, BeforeEventRenderEventArgs e) { // this assumes your event object in Events collection has "color" field or property e.BackgroundColor = (string) e.DataItem["color"]; }
ASP.NET MVC
Add OnBeforeEventRender method to the Dpm class derived from DayPilotMonth:
protected override void OnBeforeEventRender(BeforeEventRenderArgs e) { // this assumes your event object in Events collection has "color" field or property e.BackgroundColor = (string) e.DataItem["color"]; }