nhn/tui.calendar

Weekly calendar, impossible to drag and drop events

MarGraz opened this issue · 1 comments

Version

latest 2.1.3 min.js
latest 2.1.3 min.css

Test Environment

I'm using Chrome v. 117.0.5938.132 and Windows 11

Current Behavior

The event I have added to the calendar has the property "isReadOnly" set to false, so it should be possible to drag and drop it on the calendar. But is not possible, when you try to drag the event, it always return to the starting position.

There's something that I forgot to configure or that is misconfigured?

Here you can find my CodePen example.

Expected Behavior

On a weekly calendar, it should be possible to drag and drop an event.

I solved the problem. As explained in the documentation, I need to intercept the "beforeUpdateEvent" event. There's a good implementation example here, row 199, that I also report here:

      beforeUpdateEvent: function (eventInfo) {
        var event, changes;

        console.log('beforeUpdateEvent', eventInfo);

        event = eventInfo.event;
        changes = eventInfo.changes;

        cal.updateEvent(event.id, event.calendarId, changes);
      }