Код: Выделить всё
events: function(start, end, timezone, callback) {
$.ajax({
url: 'async/form.php?a=liste_consignes',
datatype:'json',
data: {
// our hypothetical feed requires UNIX timestamps
start: start.unix(),
end: end.unix()
},
success: function(msg) {
//not sur then how to parse
var events = msg.events;
callback(events); //this gives error
},
});
}
Код: Выделить всё
while($row = $query->fetch_assoc()) {
$cal['id'] = $row['consigne_id'];
$cal['title'] = $row['contenu'];
$cal['start'] = $row['date_consigne'];
array_push($return_arr,$cal);
}
echo json_encode($return_arr);
Код: Выделить всё
[{"id":"5","title":"consigne","start":"2019-03-03"},{"id":"6","title":"test","start":"2019-03-02"},{"id":"7","title":"test 2","start":"2019-03-02"}]
Подробнее здесь: https://stackoverflow.com/questions/552 ... l-calendar