2

I am trying to create a custom event tile in FullCalendar. I want to show the title on one line and an extendedProps entry on the next one. Now I found 2 ways to achieve either HTML or using args:

eventContent:  (arg) => ( arg.event.title + ' ' + arg.event.extendedProps.places + ' Places')

or

eventContent: { html: 'Title <br> places'}

What I am wondering is if there is a way to use both.

Marc
  • 25
  • 1
  • 5

1 Answers1

3

You can inject into the HTML with properties of the event as follows:

eventContent: function(eventInfo) { return { html: eventInfo.event.title + "<br> " + eventInfo.event.extendedProps.places + " Places" } }
Mike Irving
  • 1,480
  • 1
  • 12
  • 20