Our powerful JS Calendar component


Post 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.


Post 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.

All the best,
Alex


Post by jeff.wang »

thanks alex, it's ok.


Post Reply