Add Recurring Events Client Side

Is it possible to add recurring events through the client side API? Something simliar to scheduler.addEvent method.

Yes, you can use normall addEvent call, just set extra parameters for the new event object - rec_type, rec_pattern and event_length

docs.dhtmlx.com/scheduler/recurr … ntegration

[code]
scheduler.addEvent({
start_date: some,
end_date: some,
text:“my event”,

rec_type:“day_1___”,
rec_pattern:“day_1___”,
event_length:7200, //60602 = 2hours
event_pid:0
})[/code]

Thank you, that works. However, when I double click an event and choose to edit the series it doesn’t select the end date correctly. I’ve attached an image showing the problem. Also, here is the script i used to create the events:

scheduler.addEvent({
start_date: new Date(),
end_date: new Date().setHours(336),
text:“my event”,
rec_type:“day_1___”,
rec_pattern:“day_1___”,
event_length:7200, //60602 = 2hours
event_pid:0
});


Please try to use the code like next

scheduler.addEvent({ start_date: new Date(), end_date: new Date().setHours(336), text:"my event", rec_type:"day_1___#", //sharp added to the end //rec_type:"day_1___#5", //will show in popup form - end after 5 occurences rec_pattern:"day_1___", event_length:7200, //60*60*2 = 2hours event_pid:0 });

Thank you, that works for me. One more thing, which character do I use for the “No end date” radio button option?

Hi,
you need to add “no” to the recurring pattern: “week_1___1,2,3,4,5#no” when “No end date” is selected.