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

Scheduler js Field Customize

Asked by Martin
3 years 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]
3 years 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
3 years ago.

Thanks for the quick answer!

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.