Closed AllanCodes closed 6 years ago
Hi, you'll need a bit different values for recurring event Firstly, when you add events using scheduler.addEvent, start and end dates should have Date type The end_date property defines the end date of the whole series (i.e. repeat from 2018-01-01 to 2019-01-01), event duration should be set in event_length property. A following should work as expected:
scheduler.addEvent({
start_date: new Date(2018, 2, 3, 10, 0),//start_date of Date type
end_date: new Date(2019, 2, 3, 10, 0),//also Date type, end date of the whole series
text: "words",
details: "",
rec_type: "week_1___1,2",
event_pid: 0,//parent series id, not default only for modified occurrences
event_length: 3600//duration of a single event, in seconds
});
I'd like to add this event to my calendar
However, when I run through that part of my code I get an error in dhtmlxscheduler.js
Cannot read property 'valueOf' of undefined
. What's the proper way to add an event as recurring. I've added the dependency js file for recurring events and specified the following in my init