Is it possible to render a React component in the eventRenderer function in Month mode?
Support Forum
Hi,
JSX is not supported in Calendar's eventRenderer. We already have a feature request for this here https://github.com/bryntum/support/issues/7340
For now please use the regular way.
I'll mention that you've asked for this feature request to increase the priority.
Best regards,
Tasnim
Hi,
Sure, Please check the code snippet below
eventRenderer() {
return '<div style="font-size:20px; font-weight:bold;">Hello</div>';
}
And here is codepen demo for you https://codepen.io/dv-auntik/pen/YzoxbPY?editors=0010 so that you can see live results.
Best regards,
Tasnim
It appears you already know about eventRenderer
. It is fully documented at https://bryntum.com/products/calendar/docs/api/Calendar/widget/mixin/EventRenderer#config-eventRenderer
With lots of information and code snippets:
You can return an HTML string, or, simpler, a DomConfig object which represents DOM structure in a simple way. And Use CSS classes in there and your OWN CSS to make it look like you want: