According to
https://fullcalendar.io/docs/rrule-plugin
The rrule plugin should be in the events module
My events module is being loaded form a database source using
<script>
document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('calendar');
calendar = new FullCalendar.Calendar(calendarEl, {
plugins: ['bootstrap','interaction', 'dayGrid', 'timeGrid', 'list',
'rrulePlugin' ],
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
},
Duration: '00:15:00',
nowIndicator: true,
defaultDate: new Date(),
editable: true,
eventLimit: true, // allow "more" link when too many events
events:
{
url: 'renderevent.php',
method: 'POST',
rrule: { }
}
});
calendar.render();
});
</script>
I source the (id , title , start , end) from the following phpcode , but how do i also source the rrule parameters (freq,interval, dstart, until) from within the same module.
while( $row = mysqli_fetch_array($resultset) ) {
if (($row['eventtype'] ==1) && ($row['repeatevent']=="never" )){
$json[] = array (
'id' => $row['id'],
'title' => $row['title'],
// 'eventtype'=> $row['eventtype'],
'start'=> $row['startdatetimeother'],
'end'=> $row['enddatetimeother'],
'color'=> "#ff9999",
'freq' => $row['repeatevent'],
);
}
if (($row['eventtype'] ==1) && ($row['repeatevent']!="never" )){
$json[] = array (
'id' => $row['id'],
'title' => $row['title'],
// 'eventtype'=> $row['eventtype'],
'start'=> $row['startdatetimeother'],
'end'=> $row['enddatetimeother'],
'color'=> "#ff9999",
'freq' => $row['repeatevent'],
'interval' => $repeatinterval,
'dtstart' => $row['startdatetimeother'],
'until' => $row['enddatetimeother']
);
}