3 Answers, 1 is accepted
You can add a change event to the recurrence editor in the edit event of the scheduler (which triggers when you try to open the event editor window).
var recurEditor = externalEditor.find('[data-role=recurrenceeditor]').data('kendoRecurrenceEditor');
if(recurEditor != undefined){
recurEditor.setOptions({
start: new Date(e.event.start),
change: function(e){
//console.log('Changing Recurrence', e);
var currentFreq = e.sender._frequency.value();
var lastOccurrenceDate = new Date($('#startTimeInput').data('kendoDateTimePicker').value().getTime());
//console.log(kendo.toString(lastOccurrenceDate, 'ddd MMM dd yyyy'));
var recurrenceInterval = e.sender._container.find('.k-formatted-value.k-recur-interval.k-input');
if(currentFreq == 'monthly' || currentFreq == 'yearly'){
var monthlyDataSource = e.sender._weekDay.dataSource.data();
for(var i = 0; i < monthlyDataSource.length; i++){
if(monthlyDataSource[i].text == 'weekday' || monthlyDataSource[i].text == 'weekend day'){
monthlyDataSource.splice(i, 1);
}
}
}
}
});
}
That example shows something I did to remove weekday and weekend day from drop down to select first, second, third, etc. weekday, weekend day, day, monday, tuesday, etc etc. in the recurrence editor. You will need to do something similar in the change event of the recurrence editor to modify its contents.