Our powerful JS Calendar component


Post by tradii »

I want to disable the dragging of events in the Calendar.

This listeners configuration doesn't work.

<BryntumCalendar
          eventsVersion={eventsVersion}
          height={800}
          hideHeaders={true}
          sidebar={false}
          weekStartDay={1}
          modes={{
            agenda: null,
            year: null,
            week: null,
            day: null,
            month: {
              eventRenderer: (props) => __renderCustomEvent(props),
            },
          }}
          tbar={null}
          date={month}
          events={events}
          listeners={{
            // Async event listeners allowing you to veto drag operations
            beforeDragMoveEnd: ({eventRecord}) => {
              console.log("A");
              console.log(eventRecord);
              // Return true to accept the drop or false to reject it
              return false;
            },
            beforeDragResizeEnd: ({eventRecord}) => {
              console.log("B");
              console.log(eventRecord);
              // Return true to accept the drop or false to reject it
              return false;
            },
            beforeDragCreateEnd: ({eventRecord}) => {
              console.log("C");
              console.log(eventRecord);
              // Return true to accept the drop or false to reject it
              return false;
            }
          }}
      />

--
Tradii Dev Team


Post by mats »

Here is the feature to configure: https://bryntum.com/docs/calendar/#Calendar/feature/CalendarDrag#config-draggable

Move an event from its current time (in day or week views) or date (in all views except agenda) by dragging the body of an event. This can be disabled via the draggable config or via the draggable field on a per-event basis.


Post by tradii »

Thank you. The issue has been fixed

--
Tradii Dev Team


Post Reply