search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

how to dynamically add color to each tasks

Asked by Anonymous
17 days ago.

how to dynamically add color to each tasks. The color code is available via api response. refer attachment for more clarification.

Answer posted by Dan Letecky [DayPilot]
17 days ago.

You can use the onBeforeEventRender event to set custom event color in the Scheduler.

The color can be set either directly using args.data.backColor or via a CSS class (by setting args.data.cssClass).

The source data object is available as args.data.

When loading events, you can add custom properties as needed. It is recommended to store them under the tags property to avoid conflicts with the built-in properties (see also DayPilot.Event.data).

New Reply


This reply is
Attachments:
or drop files here
Your name (optional):