Premium support for our pure JavaScript UI components


Post by jnarowski »

Good afternoon Bryntum!

I'm trying to disable under certain conditions the event creation via drag gesture.

https://bryntum.com/products/calendar/docs/api/Calendar/feature/CalendarDrag#event-beforeDragCreateEnd

I'm trying this structure

  calendarDragFeature: {
    creatable: false,
  },

and

features: {
  calendarDrag: {
    creatable: false
  }
}

but none of them seem to work.

I found a workaorund using the event beforeDragCreateEnd but not the ideal behavior as the tentative event is visible during the drag (although nothing happens when I drop the click, as expected). We can work with this right now but wondering what is wrong with my approach to disable the feature from the very beginning?

Attached is my code example. The attempted code is in Calendar.vue:84

In the scheduler I found the beforeDragCreate which works exactly as I want. But the Calendar event shows the tentative event at the beginning

Thank you!!!

Attachments
bryntum-calendar-vite.zip
(57.57 KiB) Downloaded 11 times

Post by ghulam.ghous »

Hi there,

It has to be dragFeature instead of calendarDragFeature. Following will work for you:

  dragFeature: {
    creatable: false,
  },

See this example where it is being used: https://bryntum.com/products/calendar/examples/show-booking/

Hope it helps!

Regards,
Ghous


Post Reply