嗨,我想对数据库使用全日历,但是我一旦在日历中放置了1万多个事件,它就会停止显示事件。 有没有办法阻止全日历停止显示事件?
下面的版本是4.0.0
(我使用了全日历的3.9.0和4.0.0都不起作用)
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', function () { // DOMContentLoaded zorgt ervoor dat eerst de html laad
var calendarEl = document.getElementById('calendar'); // grab element reference
var calendar = new FullCalendar.Calendar(calendarEl, {
// put your options and callbacks here
events: [
<?php
include_once('./assets/handlers/DB_Handler.php');
try {
$getCalenderItems = $conn->prepare("SELECT COD.CursusID, O.Onderdeelnaam,
CONCAT( REPLACE( DATE_ADD( DATE( CO.DatumBegin ) , INTERVAL -1 MONTH ) , '-', ',' ) , ',', HOUR( CO.DatumBegin ) , ',', MINUTE( CO.DatumBegin ) ) AS Start,
CONCAT( REPLACE( DATE_ADD( DATE( CO.DatumEind ) , INTERVAL -1 MONTH ) , '-', ',' ) , ',', HOUR( CO.DatumEind ) , ',', MINUTE( CO.DatumEind ) ) AS Eind
FROM cursusonderdeeldocenten COD
INNER JOIN onderdelen O ON COD.OnderdeelID = O.OnderdeelID
INNER JOIN cursusonderdelen CO ON COD.CursusID = CO.CursusID
WHERE COD.DocentID = 15
AND CO.DatumBegin >= DATE_ADD(CURDATE(), INTERVAL -8 MONTH)
ORDER BY CO.DatumBegin");
$getCalenderItems->bindParam(':DocentID', $DiD);
// Select docent
$DiD = 15;
$getCalenderItems->execute();
$count = $getCalenderItems->rowCount();
} catch (PDOException $e) {
$e->getMessage();
}
$i = 0;
while ($row = $getCalenderItems->fetch()) {
echo '
{
title: "' . $row['Onderdeelnaam'] . '",
start: new Date(' . $row['Start'] . '),
end: new Date(' . $row['Eind'] . '),
url: "./beoordelen/' . $row['CursusID'] . '"
}';
if ($i >= $count) {
echo "";
} else {
echo ",";
}
$i++;
}
?>
]
});
calendar.render();
});
</script>
<div id='calendar'></div>
</div>