Page 1 of 1
Can i drag the events from the custom react component to calendar without grid integration
Posted: Mon May 16, 2022 10:14 am
by jeff.wang
In example: https://www.bryntum.com/examples/calendar/dragfromgrid/, the developer can drag events from external bryntum grid, but i have a sidebar that is own react custom component(it is not a bryntum component), can i drag the events from the custom react component to calendar? i want to confirm if calendar is support,if it is yes,if calendar has some requirements like data format.
Re: Can i drag the events from the custom react component to calendar without grid integration
Posted: Mon May 16, 2022 11:33 am
by alex.l
Yes, it is supported and described here https://bryntum.com/docs/calendar/api/Calendar/feature/ExternalEventSource
with some basic HTML example. So, it may be React component as well.
A Calendar feature which allows new events to be dragged into the Calendar from an external source.
The default source type is a Bryntum grid which is loaded with event records.
Optionally, the source can be specified by configuring a dragRootElement
and a dragItemSelector
which together, identify elements which represent draggable events.
In this case, a getRecordFromElement
may be specified to yield the details of the record to be dragged.
In the simplest case the textContent
of the identified element is used as the event name and getRecordFromElement
is not required. The event duration
in this case will be that specified in the receiving Calendar's autoCreate
setting.
When dropping an unscheduled event (An event that has no start and end date specified) into a day cell (For example a MonthView or YearView), the start time set within the day cell will default to the startHour
property of the receiving Calendar's autoCreate
setting.
Re: Can i drag the events from the custom react component to calendar without grid integration
Posted: Mon May 16, 2022 2:34 pm
by jeff.wang