Our powerful JS Calendar component


Post by parl@nuviasmiles.com »

Is it possible to override the event header render event in Calendar? I can't find any function that would allow it. Any other tricks for that?


Post by Animal »

What exactly do you mean by "event header"? Which exact bit of the UI do you want to change?


Post by parl@nuviasmiles.com »

The header has the hour in the top left and an optional icon on the right, I want to put information in the middle between them, but it all lives in a header I don't know to edit.


Post by Animal »

Here?

Screenshot 2024-02-20 at 12.20.51.png
Screenshot 2024-02-20 at 12.20.51.png (36.92 KiB) Viewed 206 times

Post by Animal »

I'm guessing you just need an eventRenderer

https://bryntum.com/products/calendar/docs/api/Calendar/widget/mixin/EventRenderer#config-eventRenderer

Screenshot 2024-02-20 at 14.10.13.png
Screenshot 2024-02-20 at 14.10.13.png (270.25 KiB) Viewed 195 times

Post by parl@nuviasmiles.com »

You are correct about where, but the eventRenderer doesn't let me reformat or add to the Time format or add any data to the header of the event, like directly after the time "7 PM - Some other data" in the header.


Post by Animal »

We should be able to do it, but I think we have not separated our time formatting options properly: https://codepen.io/Animal-Nige/pen/gOEyvdP?editors=0010

timeFormat is used in both events and creating the time axis at the left. I think we dropped the ball there. The two usages are different. They may default to a single format, but apps should be able to specify each separately.

https://github.com/bryntum/support/issues/8642


Post by parl@nuviasmiles.com »

It would seem like if you have a dayHeaderRenderer and other renderers it would be useful to have a eventHeaderRenderer to wouldn't it? Not just a time formatter?


Post by Animal »

The https://github.com/bryntum/support/issues/8642 ticket includes an eventHeaderRenderer config which is a callback, just like eventRenderer produces content for the event description.

This should be in a release in the next couple of weeks. (Minus typos when review process is complete)

Screenshot 2024-02-21 at 09.52.48.png
Screenshot 2024-02-21 at 09.52.48.png (129.78 KiB) Viewed 158 times

Post Reply