I’m trying to develop an integration with the scheduler and I need to get all the events (including the recurring) for a certain period.
Analyzing the scheduler, I noticed that I could use the file “events.php”, passing as a parameter the desired period, but when I did that, I’ve noticed that some recurring events out of the period are being shoewd in and I cannot understand why.
Also, I have a daily recurring event that happens at 2pm, but on a certain date has been moved to 11am, which in the database creates a second instance of the same event. When trying to pick up the day’s events with “events.php”, I’m getting in the returned XML two instances of the event.
What can I be doing wrong? Is there a way to get the events that really happens in a certain period?
I also tested the JS function getEvents(), but the result was the same: Events recurring outside the period.
This may be a designed behavior. However i’m not sure what code do you run and what events do you see, maybe i’m getting it wrong.
Recurring series stored in the db as events with start/end dates meaning dates of the whole series(from the date of the first occurence to the date of the last one).
For example, if there is a serie from 1st January 2014 to 1st January 2015 and you load 1-30 June 2014 - recurring serie still has to be loaded since it occures within the loaded period
This is probably means the deleted/modified instances of the recurring series. They stored as a separate records and refers to the parent serie, see the doc article above
Hello,
yes, the helper should handle recurring events. When you retreive events from the date range it returns array of occurences. e.g. if you have dayly recurrence(single record in the db) and you retreive events for a week, helper should return array of 7 elements, each of them is an occurence of the serie with a correct date
By the way, I’ve noticed that the end time in the not recurring events are exactly the same as the start time, which gives me events with duration of 0 minutes.
I’ve commented the line bellow and everything worked fine:
//$ev[‘end_date’] = date(“Y-m-d H:i:s”, $cur_date + $this->event_length);
Hi,
thanks for the info!
I think that way you may get an incorrect dates of recurring events. Try adding a condition, instead of commenting-out the line:
Using ScheduleHelper not displaying events based on actual timings (starttime and endtime)
Suppose event is there in between 2014-07-17 00:00:00 and 2014-07-17 10:20:00,getevent returning empty array
Aliaksandr
Sorry to tell you that concept wrong behind Scedule Helper bcoz when ever a event from recurring event get modified its inserting new record but deleting that record its get deleted rather than updating rec_type as none,give me a favour regarding issue
dhtmlxConnector seems to handle such cases correctly, since in our samples if you delete modified instance the database item receives rec_type=none.
According the sources, SchedulerHepler.php also handles the deleted instances correctly github.com/DHTMLX/scheduler-wor … er.php#L61
The problem might be related to the time zone settings. Please try the attached version of the helper. Does it works any different? SchedulerHelper.zip (2.7 KB)
Hi Stanislav
I have a record like this in my DB
id start_date end_date text rec_type event_pid event_length
1 2014-06-24 12:50:00 2014-06-24 14:45:00 New event 0 0
But using ScheduleHelper it cant able to fetch between 2014-06-24 12:50:00 and 2014-06-24 14:45:00 (Exact time of a date)
one more question i.e wht exactly event_length? its look like storing in seconds,but when i tried to ptint date and time of that second its neither mathching with start_date or end_date of my event stored in DB. Can u please explain.
Hello and thank you for this helper class. I’m having problems with it fetching all-day events. It only seems to fetch events with start & end dates that are different. Please let me know if there’s a way to debug this; thank you for any input.