Our pure JavaScript Scheduler component


Post by jerome »

I have managed to customize the items and labels that appear in the popup using eventEditFeature and editorConfig. Now I would like to have the title dynamically updated from the event title and remove it from items. I can only manage a static title right now. I am not sure how to reference the data in the eventRecord in the config. Or if it is even possible.

I would also like to change the background color of the title bar. I also only saw that we can change the title based on a post. Is there anywhere in the documentation where the full set of options for editorConfig are listed?

Here is my code:

    eventEditFeature: {
      editorConfig: {
        title: "Event",
        items: {
          // Merged with provided config of the resource field
          resourceField: {
            label: "Lead",
          },
          nameField: {
            label: "Event Title",
          },
          location: {
            type: "TextField",
            name: "location",
            label: "Location",
          },
          eventtype: {
            type: "TextField",
            name: "eventType",
            label: "Type",
          },
        },
      },
    },

Post by alex.l »

Is there anywhere in the documentation where the full set of options for editorConfig are listed?

You can set any config that https://www.bryntum.com/docs/scheduler/#Core/widget/Popup supported.

Now I would like to have the title dynamically updated from the event title and remove it from items.

In our guide here https://www.bryntum.com/docs/scheduler/#guides/customization/eventedit.md#customizing-the-child-widgets we have some useful information how to manage child widgets state and data.
Shortly, you need this event: https://www.bryntum.com/docs/scheduler/#Scheduler/feature/EventEdit#event-beforeEventEditShow

scheduler.on('beforeEventEditShow', ({ editor, eventRecord }) => editor.title = eventRecord.name );

All the best,
Alex

All the best,
Alex


Post Reply