完整的日历事件呈现,jQuery

时间:2017-12-01 13:46:24

标签: jquery fullcalendar

是否可以在完整日历上编辑活动?目前我只看到有关事件的文本,但我想要做的是导入图片,所以它应该有名称,专业,日期。我尝试通过prepend jQuery编辑它,所以我写了

$(element).find('.fc-title').prepend('<div class="example" ></div>');

当我将事件拖入其中时,它应该从那里删除日期并在事件div中显示

2 个答案:

答案 0 :(得分:2)

您需要使用eventRender: function(event, element) {功能。然后您可以像这样访问/修改标题HTML:

element.find('.fc-title').html();

在这里,您可以添加图像,或呈现已添加的HTML。

这会添加到日历中,如:

$('.calendar').fullCalendar({
   weekends: false,
   eventRender: function(event, element) {
      element.find('.fc-title').html('<div class="example"></div>');
   }
});

答案 1 :(得分:0)

您需要更新“.fc-title”

的CSS

或者:

element.find('.fc-title').css({ 'white-space:': 'normal !important' });

或CSS:

.fc-title { white-space: normal !important; }

相关问题