Expose the calendar that external event is dropped on
Closed this issue · 1 comments
bwobbones commented
I have several calendars displayed on the screen at one time and I'd like to drag and drop events between them. The display and drag and drop works really well within each calendar, but when I drop it a different calendar I have no idea to work out which one they've dropped it on.
Is there already a way to do this? Or maybe could you provide some guidance as to how I might do it and I'll submit a PR?
mattlewis92 commented
Oh interesting use case! You should be able to work around this by setting the name of the source calendar on each event object so you can work out there it was dragged from e.g.
vm.events = [{
title: 'title',
calendarName: 'calendar1'
}]
and then on the drop callback do something like
on-event-times-changed="vm.eventDropped('calendar2', calendarEvent, calendarNewEventStart, calendarNewEventEnd)"
Hope that helps! 😄