I am using the Hotel Reservation Demo to learn about the Scheduler/Timeline. I started with the basic scheduler code and adding the Timeline code from the Demo.
I have added test data to the database and it renders properly. But when I try to add an event with the UI I get the error:
Unable to get property ‘_helpers’ of undefined or null reference
This is my create function:
// create a new event
function create($db, $event){
$queryText = "INSERT INTO `events` SET
`room`=?,
`start_date`=?,
`end_date`=?,
`text`=?,
`status`=?,
`is_paid`=?,
`event_pid`=?,
`event_length`=?,
`rec_type`=?
WHERE `id`=?";
$queryParams = [
$event["room"],
$event["start_date"],
$event["end_date"],
$event["text"],
$event["status"] ? $event["status"] : 1,
$event["is_paid"] ? $event["is_paid"] : 0,
$event["event_pid"] ? $event["event_pid"] : 0,
$event["event_length"] ? $event["event_length"] : 0,
$event["rec_type"] ? $event["rec_type"] : 0
];
$query = $db->prepare($queryText);
$query->execute($queryParams);
return $db->lastInsertId();
}
The fields all exist and I formatted the code to follow the same fields order to ensure I didn’t miss anything.
The error points to:
[dhtmlxscheduler.js (8425,19)][…/codebase/sources/dhtmlxscheduler.js)
Here is the snippet from the file:
this.attachEvent(“onEventChanged”,function(id){
if (!this._loading && this._validId(id))
dp.setUpdated(id,true,“updated”);
});
Thoughts on how to debug this?
Thank you.