如何在 DHTMLX Scheduler 中实用地添加重复事件?

How to add recurring events pragmatically in DHTMLX Scheduler?

我想将此活动添加到我的日历中

let eventID = scheduler.addEvent({
                        start_date: "2018-03-03 10:00:00",
                        end_date: "2018-03-10 11:00:00",
                        text: "words",
                        details: "",
                        rec_type: "week_1___1,2",
                    });

但是,当我 运行 通过我的那部分代码时,我在 dhtmlxscheduler.js 中遇到错误 Cannot read property 'valueOf' of undefined。将事件添加为重复发生的正确方法是什么。我已经为重复发生的事件添加了依赖 js 文件,并在我的 init

中指定了以下内容
    scheduler.config.details_on_create=true;
    scheduler.config.details_on_dblclick=true;
    scheduler.config.include_end_by = true;
    scheduler.config.repeat_precise = true;        
    var today = new Date(); 
    scheduler.init('scheduler_here',today, "week"); 

如果您将 addEvent 用于重复事件,start/end_date 属性的值必须具有日期类型:

let eventID = scheduler.addEvent({
  id: '1',
  start_date: new Date(2018, 2, 3, 10), 
  end_date:   new Date(2018, 2, 10, 11),      
  text:"words",
  details: "",
  rec_type: "week_1___1,2",
  event_pid: "0",
  event_length: 60*60*4
})