Im trying to render a json data to a scheduler but fail to render (no errors on the console though, please check my code below.
my front-end side
//event calendar
$(".myscheduler").dhx_scheduler({
xml_date:"%Y-%m-%d %H:%i",
date:new Date(),
mode:"month"
});
$.ajax({
url : $("body").attr("data-link") + '/json/get-data',
dataType: 'json',
type: 'post',
data : { _token : $("body").attr("data-token") },
success: function(response){
scheduler.parse(response.test);
}
});
and here's my side script part (php)
$response = array(['id' => '1', 'start_date' => '2015-10-16 00:00:00', 'end_date' => '2015-11-16 00:00:00', 'text' => 'test', 'details' => 'Details for French Open'], ['id' => '2', 'start_date' => '2015-11-16 00:00:00', 'end_date' => '2015-11-16 00:00:00', 'text' => 'test', 'details' => 'Details for French Open']);
echo json_encode(['success' => true, 'test' => $response]);
any help, clues, ideas, suggestions, recommendations so that I could render the json response to the dhtmlx scheduler?