This is the PHP code that loads the events :
$q_e = mysqli_query($sqllink,"SELECT * FROM data_calendar_event WHERE
nuid='$nuid' AND valid='1'");
while ($r_e = mysqli_fetch_array($q_e) ){
$start = date("Y-m-d H:i",$r_e['StartDate']);
$end = date("Y-m-d H:i",$r_e['EndDate']);
switch($r_e['FullDay']){
case 0:
$FullDay = FALSE;
break;
case 1:
$FullDay = TRUE;
$end = NULL;
break;
}
//$rrule = "DTSTART:20129201T103000Z
RRULE:FREQ=WEEKLY;INTERVAL=5;UNTIL=20120601;BYDAY=MO,FR";// NULL;
$EventID = base64url_encode($r_e['EventID']);
$event_array[] = array(
'id' => $EventID,
'title' => $r_e['EventName'],
'color' => $r_e['EventColor'],
'allDay' => $FullDay,
'start' => $start,
'end' => $end,
//'rrule' => $rrule
);
}
This is the javascript that calls the PHP script :
eventSources: [{
url: 'load.events.php',
method: 'POST',
extraParams: {
token: '<? echo $token; ?>'
},
}],
the token is just an internal part of the script.
Rrule output is something like this : DTSTART:20190301T230000Z RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE,FR;COUNT=5
I am using the RRule Plugin of Fullcalendar and if I uncomment rrule I get the following error : Failure parsing JSON Object.
I have looked into the docs at https://fullcalendar.io/docs/rrule-plugin and followed the instructions, but I must have missed something.