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

Scheduler js Field Customize

Asked by Martin
18 days ago.

Hello,

is there a way to customize the fields for an event in the Javascript Scheduler?

I can see in the docs only that option for asp.net
https://aspnet.daypilot.org/api/pro/latest/html/P_DayPilot_Web_Ui_DayPilotScheduler_DataResourceField.htm

What I would like to achieve is, that for example the "resource"-field of an event can be changed to "resourceStudio".

The same for DataStartField, DataEndField.

Thanks!
Martin

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

Hi Martin,

In the JavaScript version, it's not possible to change the mapping.

But you can transform your object easily like this:

const myEvents = [ /* ... */ ];
const events = myEvents.map(e => ({
  ...e,  // copy the original object
  resource: e.resourceStudio  // override a selected property
  // ...
}));
dp.update({events});
Comment posted by Martin
18 days ago.

Thanks for the quick answer!

New Reply
This reply is
Your name (optional):