I have the recurrence rule for the recurring appointments stored in a db, and I want the user to be able to edit the rule at a later date through the ejRecurrenceEditor.
The appointments are opened in a custom modal window when editing them in the Schedule.
My question is, how do you set the initial values of all the components in the ejRecurrenceEditor?
I want to be able to initialize the ejRecurrenceEditor based on simple and complex recurrence rules such as:
- FREQ=WEEKLY;INTERVAL=2;BYDAY=MO
- FREQ=YEARLY;BYDAY=FR;BYMONTH=5;BYSETPOS=3;INTERVAL=2;COUNT=10
In the following code snippet I would like to be able to 'apply' my recurrence rule to the recurrence editor, either when initilizing the ejRecurrenceEditor or when the create event is called.
$("#RecurrenceEditor").ejRecurrenceEditor({
startDate: new Date(startDate),
frequencies: ["daily", "weekly", "monthly", "yearly", "everyweekday"],
selectedRecurrenceType: 0,
locale: "da-DK",
dateFormat: "yyyy-MM-dd",
create: function (args) {
var ruleFromDB = "FREQ=WEEKLY;INTERVAL=2;BYDAY=MO";
// set component based on above rule
}
});