Our powerful JS Calendar component


Post by freeplusxx04 »

Hi.

In my event edit modal I have the following fields:

image (10).png
image (10).png (70.76 KiB) Viewed 799 times

I want to disable field name, calendar and all day if event.type is 'eventdblclick', in the method onCalendarEvents(event) I inserted a console.log() of event and this is my output:

image (11).png
image (11).png (25.39 KiB) Viewed 799 times

Do exists some way in this event to disable those fields?


Post by alex.l »

Hi freeplusxx04,

You can get EventEditor from any place you need throw 'eventEdit' feature:

const editor = calendar.eventEdit.getEditor();
// to disable a field you may use
editor.widgetMap.fieldName.disabled = true;

All best,
Alex

All the best,
Alex


Post by freeplusxx04 »

Perfect, it worked, thanks!

But I had to use calendarInstance:

const editor = this.calendar.calendarInstance.eventEdit.getEditor();
        editor.widgetMap.nameField.disabled = true;

Post Reply