Our powerful JS Calendar component


Post by orthobridge »

Hi,

We've implemented a clipboard feature where events have a tools menu to add to the clipboard (an external database table). We'd like to be able to drag events from the calendar into the clipboard (grid). Is this actually feasible ? Any guidance if so.

NOTE: We just need to fire an event, saving into the grid will be done with our tables and plumbing. It's just an event we need to hook.

Thanks as always

Attachments
bryn.PNG
bryn.PNG (284.58 KiB) Viewed 198 times

Post by marcio »

Hey orthobridge,

If I undestand correctly what you want, you can use the trigger function to manually trigger an event (or even a new custom one) https://bryntum.com/products/calendar/docs/api/Core/mixin/Events#function-trigger

calendar.trigger('custom-event', params)

Best regards,
Márcio


Post by orthobridge »

Thanks Marcio for quick reply

I want to trigger an event when I drag the event over the Grid in the clipboard. At the moment I can't seem to drag it into the clipboard - it doesn't drag beyond the splitter - see image


Post by Animal »

This will require some fairly complex coding. Perhaps the ExternalEventSource feature could be configurable with whether to be able to drag in or out of both: https://github.com/bryntum/support/issues/6826


Post by Animal »

OK, I have an enhancement to the ExternalEvents feature. If you configure it with droppable : true (It's as simple as that if it is using a Grid because we understand a Grid) then you get a dropExternal event fired by the Calendar.

API still to be discussed internally, but the concept is working:

dragout.gif
dragout.gif (246.91 KiB) Viewed 162 times

Post by orthobridge »

Thanks Animal.

That's exactly what's required.

So we simply add a droppable:true to the Calendar?

Can you show your code please - saves hours this end :-)


Post by Animal »

It's a bit too much to patch. This should be available in 5.4

droppable : true will be on the feature


Post by orthobridge »

Ok, thanks.


Post Reply