Get Events in PHP

Hello, the error went away, thank you. But now getData() keeps returning NULL. I will try to debug in case it’s my data/code. Thanks again!

Hi,
what parameters do you pass to getData method? Is it possible that you use a not expected format of dates, which can’t be recognized by the backend?
Also, are you sure that it return NULL and not an empty array? As i can see from the sources, it can’t return anything but an array instance
github.com/DHTMLX/scheduler-hel … r.php#L331

You’re right, it was an empty array, my bad. Here are the dates being passed as strings:

“2015-04-27 00:00:00”, “2015-04-28 00:00:00”

var_dump of the returned array - array(0) { }

Yes, the dates are valid. Although, the sql data you’ve sent before does not have events in that interval, i’ve loaded it into the scheduler and there is no events on 27th-28th April 2015
Do you test it on the same dataset you send me, or on some other?

Yes, sorry I moved some events around on the front-end in order to test. Will PM you the data now, thank you.

Thanks, we’ve confirmed a bug

Ok thanks, keep me posted.

Hi,
please try the latest version from the repo
github.com/DHTMLX/scheduler-helper-php

After a few simple tests it seems like it works great, thanks guys! I will run some more test just to be sure.

Hi guys, is there a built-in function to tell if an event is all-day or not? I know I can use PHP to compare start and end dates, but figured I would ask you first. Thanks!

Hello,
there is no built-in method, you’ll have to inspect the dates