我有以下代码,在我添加到代码之前一切正常 eventRender,我显示:
var data = [
{Id: "1", title: "Teste", start: "2023-03-10 17:00:00", end: "2023-03-10 17:30:00", nome: "A", },
{Id: "2", title: "Teste1", start: "2023-03-11 17:00:00", end: "2023-03-11 17:30:00", nome: "B"},
{Id: "3", title: "Teste2", start: "2023-03-12 17:00:00", end: "2023-03-12 17:30:00", nome: "C"},
];
$('#calendario').fullCalendar({
defaultView: 'listWeek',
header: {
language: 'PT',
left: 'prev,next today',
center: 'title',
right: 'listWeek,agendaDay'
},
editable: false,
eventLimit: true,
events: data,
eventRender: function(event, element, view) {
element.popover({
title: '<div class="popoverTitleCalendar">'+ event.title +'</div>',
content: '<div class="popoverInfoCalendar">' +
'<p><strong>Responsável:</strong> ' + event.nome + '</p>' +
'</div>',
delay: {
show: "800",
hide: "50"
},
trigger: 'hover',
placement: 'top',
html: true,
container: 'body'
})
},
});
<link href="https://fullcalendar.io/js/fullcalendar-3.6.1/fullcalendar.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.19.1/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://fullcalendar.io/js/fullcalendar-3.6.1/fullcalendar.js"></script>
<script src="https://fullcalendar.io/js/fullcalendar-3.6.1/gcal.js"></script>
<div id="calendario"></div>
点击事件的时候,想返回eventRender信息,但是不行
你能帮忙解决这个问题吗?