Edit this page

toOccurrence

Converts the scheduler event to a event occurrence. Method will remove recurrenceRule, recurrenceException options, will add a recurrenceId field and will set id to the default one.

Parameters

options Object

Additional options passed to the SchedulerEvent constructor.

uid property of the event will be preserved.

Returns

kendo.data.SchedulerEvent the occurrence.

Example - create occurrence from a scheduler event

<script>
    var event = new kendo.data.SchedulerEvent({
        id: 1,
        title: "Task1",
        start: new Date(2013, 10, 11, 12),
        end: new Date(2013, 10, 11, 14),
        recurrenceRule: "FREQ=DAILY"
    });

    var occurrence = event.toOccurrence();

    console.log(occurrence.id); //logs default id
    console.log(occurrence.recurrenceId); //logs id of the head. In this case '1'
    console.log(occurrence.recurrenceRule); //logs 'null'
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy