Skip to main content

Formatting Labels, Dates, Styles

Follow the link of a view to see the templates supported by it.

Default views​

Extension views​

Common for all views​

Specifying Templates​

You can set templates in 2 ways: either from code or from HTML markup.

Specifying templates with code​

By default, templates can be defined as JS functions that take the event object or date arguments and must return an HTML string that will be inserted into the layout:

scheduler.templates.event_text = (start, end, event) => {
return `<a href='http://some.com/details.php?for=${event.id}'>${event.text}</a>`;
};

Specifying templates via markup​

Alternatively, templates can be defined declaratively from HTML. This approach requires adding the html_templates extension to the page. Once you've activated the extension on the page, you may specify templates as follows:

<div class="template:event_text">
<a href='http://some.com/details.php?for="{event.id}"'>{event.text}</a>
</div>

The complete list of templates can be found in the API.

Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.