I\'m using wordpress, formidable forms and full calendar to create a bespoke calendar solution
I have everything working except for I\'d like to add a font awesome i
With fullcalendar V4 my render looks like this
json title with $ICON as placeholder:
{
start: date
title: '$ICON custom_name'
img: 'fontawesome-icon-name'
}
eventRender: function(info) {
info.el.innerHTML = info.el.innerHTML.replace('$ICON', "");
}
Edit: With fullcalendar 5.x.x, my approach is a little bit different and as I only add the icon at the front I don't need the $ICON placeholder anymore.
eventContent: function (args, createElement) {
const icon = args.event._def.extendedProps.img;
const text = " " + args.event._def.title;
return {
html: text
};
},
Cheers Hannes