Php 在事件完整日历4中显示更多详细信息
我不知道如何在fullcalendar 4事件中显示更多详细信息。在这篇文章之后: 我尝试了此代码,但没有成功:Php 在事件完整日历4中显示更多详细信息,php,fullcalendar-4,Php,Fullcalendar 4,我不知道如何在fullcalendar 4事件中显示更多详细信息。在这篇文章之后: 我尝试了此代码,但没有成功: eventRender: function( info ) { if (info.view.type == "timeGridWeek") { info.el.find('.fc-title').html('something'); } }, 但我得到了一个错误:解析JSON失败。你知道我做错了什么吗?多谢各位 编辑: 我发现使用下面的代码可以得到类名为fc
eventRender: function( info ) {
if (info.view.type == "timeGridWeek")
{
info.el.find('.fc-title').html('something');
}
},
但我得到了一个错误:解析JSON失败。你知道我做错了什么吗?多谢各位
编辑:
我发现使用下面的代码可以得到类名为fc title的get div:
eventRender: function(info) {
console.log(info.el.getElementsByClassName("fc-title"));
},
但无法找到如何附加div或span或其他元素。最后我找到了:
eventRender: function(info) {
var user = document.createElement('div');
user.innerHTML = info.event.extendedProps.calendarUser;
info.el.lastChild.lastChild.appendChild(user);
}
这将把div添加到className为“.fc title”的元素中。我已经花了很多时间来研究这个问题。谢谢你。