希望使用完整日历并将图像包含为事件和可拖动。简而言之,很想看看这个例子如何https://fullcalendar.io/js/fullcalendar-3.0.1/demos/external-dragging.html将使用小缩略图而不是文本“我的活动 1、我的活动 2”等。并将该图像显示在日历上。
提前致谢。
您可以通过在事件定义中添加属性“imageurl”来将任何图像 url 添加到 eventObject(如果您只需要图像,请不要指定标题):
events: [
{
title : 'event',
start : '2016-10-12',
end : '2016-10-14',
imageurl:'img/edit.png', //you can pass the image url with a variable if you wish different images for each event
.
.
.
}
之后,在 eventRender 中添加以下代码,这会将图像图标添加到事件中(16 的宽度和高度是缩略图的合适尺寸):
eventRender: function(event, eventElement) {
if (event.imageurl) {
eventElement.find("div.fc-content").prepend("<img src='" + event.imageurl +"' width='16' height='16'>");
}
},
有关更多详细信息,请参阅此问题:在事件的第一行添加图标 (fullCalendar)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)