Well this topic is old, but I couldn't find here how to do it with <img>
tags so I leave here another way to put images in fullcalendar events:
Add in your eventObject
a path to the image. If you use javascript it would be something like:
events: [
{
title : 'event1',
start : '2010-01-01',
imageurl:'img/edit.png'
},
{
title : 'event1',
start : '2010-01-01'
}]
Then on eventRender
just put the image:
eventRender: function(event, eventElement) {
if (event.imageurl) {
eventElement.find("div.fc-content").prepend("<img src='" + event.imageurl +"' width='12' height='12'>");
}
},
If you want to use the same image on all items, you just need to put this in your eventRender
:
eventElement.find("div.fc-content").prepend("<img src='pathtoimage.png' width='12' height='12'>");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…