拆分kendo调度程序出现

时间:2016-07-13 12:59:03

标签: kendo-ui kendo-scheduler

从第1天到第3天创建了事件。现在,我需要使用kendo调度程序中的出现CLONE分别将Day1,Day2和Day3分开。

如何拆分事件?

  var scheduler = $("#scheduler").data("kendoScheduler");
    var originalEvent = occurance;

   var clone = occurance.clone({
        start: new Date("2013/6/4 00:01"), //occurance.start, //new Date("2013/6/4 00:01"),
        end: new Date("2013/6/4 20:50"),
        title: "sella"
    });
    scheduler.dataSource.add(clone);

    var clone1 = occurance.clone({
        start: new Date("2013/6/5 00:01"),
        end: new Date("2013/6/5 23:50"),
        title: "sella222"
    });
    scheduler.dataSource.add(clone1);

    var clone2 = occurance.clone({
        start: new Date("2013/6/7 00:01"),
        end: new Date("2013/6/7 23:50"),
        title: "sellasfgsg5323"
    });
    scheduler.dataSource.add(clone2);

    //ToDo: remove just the single occurance of the event based on its target and uid
    scheduler.dataSource.remove(originalEvent);
    originalEvent.update(clone);
    originalEvent.update(clone1);
    originalEvent.update(clone2);

    scheduler.dataSource.sync();

现在,clone,clone1,clone2未在调度程序网格中更新。

0 个答案:

没有答案