1

Here is the link to some similar questions:

Add font awesome icon to full calendar title

https://pretagteam.com/question/how-to-append-an-element-to-display-more-text-in-full-calendar-event-with-react-js

I am using ReactJS with Full Calendar V5, My question is How do I append additional text to the Calendar Title? I referred to the links above but the problem is that it is very old version and full calendar does not have those methods anymore, I need to use something called render hooks, here is the link

https://fullcalendar.io/docs/event-render-hooks

I am not sure which one to use or how to find the title class in full calendar so that I can append my dynamic title, I want to give calendar a name and display it right under the title of full calendar. So how do I find the class where the title is there, and get it inside my react component and append text to it?

Expected result: enter image description here

ADyson
  • 57,178
  • 14
  • 51
  • 63
WildThing
  • 969
  • 1
  • 12
  • 30
  • 1
    There's no render callback for the title. All you can do through the API is alter the date format, via https://fullcalendar.io/docs/titleFormat. If you want to find out the title's CSS class or element ID, use the element inspector in your browser's Developer Tools - just right-click the title area when the calendar is loaded and choose Inspect from the context menu (in most browsers anyway). – ADyson Nov 21 '21 at 07:24
  • Hey @ADyson! Thanks that is a good idea. But from the Docs I see that it is an Object with some fixed values, How can I append a custom String to it / Edit it such that It will show the custom title, – WildThing Nov 21 '21 at 07:28
  • You can use normal JavaScript to append to the html after the calendar has rendered. You might have to repeat it each time the view renders. – ADyson Nov 21 '21 at 08:12

0 Answers0