ExternalEventSource
Feature
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.
This feature is disabled by default.
Useful configs
| Config | Description |
|---|---|
| grid | Grid instance (or id) to drag events from |
| dragRootElement | Root element for non-grid drag sources |
| dragItemSelector | Selector identifying draggable items |
| getRecordFromElement | Function to create an event record from a dragged element |
| droppable | Enable dropping events back from Calendar to source |
See also
- CalendarDrag — The built-in drag feature for internal events
- autoCreate — Default event properties for dropped events
Configs
Configs are options you supply in a configuration object when creating an instance of this class-
The grid, or
idof a grid from which events are to be dragged. -
By default, the proxy shown when "picking up" the grid row is hidden when dragging over the calendar because the CalendarDrag feature automatically shows a drop position indicator which shows where the proposed new event will be.
-
Used when droppable is used, and the external source is a Grid. This allows us to track the over row to highlight the insertion point.
Properties
Properties are getters/setters or publicly accessible variables on this class-
Identifies an object as an instance of ExternalEventSource class, or subclass thereof.
-
Identifies an object as an instance of ExternalEventSource class, or subclass thereof.