v7.3.0

EventRenderer
Mixin

Mixin that provides the ability to generate DomConfig blocks for rendering event bars in Calendar views. It produces the DOM structure for event elements including the event body content, icon, color styling, and CSS class management. The mixin supports a customizable eventRenderer function that allows applications to modify the appearance and content of event bars at render time.

Views that use this mixin accept an eventRenderer config to customize event display:

const calendar = new Calendar({
    modes : {
        month : {
            eventRenderer({ eventRecord, renderData }) {
                // Add a custom CSS class based on event data
                renderData.cls['my-custom-event'] = eventRecord.type === 'meeting';
                renderData.style.fontWeight = eventRecord.important ? 'bold' : '';
                return eventRecord.name;
            }
        }
    }
});
No results

Configs

Configs are options you supply in a configuration object when creating an instance of this class

Properties

Properties are getters/setters or publicly accessible variables on this class
  • isEventRenderer : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of EventRenderer class, or subclass thereof.

Functions

Functions are methods available for calling on the class

    Source path

    Calendar/widget/mixin/EventRenderer.js

    Contents