0

I am trying to add recurring events in calendar using dhtmlx scheduler.

var data = {
                start_date: "2017-12-03 10:00:00",
                end_date: "2019-12-22 10:00:00",
                text: "test",
                rec_type: "week_1___6",
                event_length: 720
            };
        scheduler.parse(data, 'json');

I have but the event is not adding in the calendar. I even tried scheduler.addEvent that also did not work.

Can you please let me know where I am making a mistake?

mujtaba
  • 21
  • 3

1 Answers1

0

You should add square brackets

var data = [ { id: 1, start_date: "2017-12-03 10:00:00", end_date: "2019-12-22 10:00:00", text:"test", rec_type: "week_1___6", event_pid: "0", event_length: 60*60*2 } ];

After that recurring events will be displayed to Scheduler: http://docs.dhtmlx.com/scheduler/snippet/d3b3adaa

Polina
  • 412
  • 2
  • 6