Search code examples
angularjskendo-uikendo-asp.net-mvckendo-scheduler

Change editRecurringMode dynamically on editable template in kendo scheduler


I want to skip the Edit Recurring dialog(which content options for "edit series" and "Edit occurrence" ) in KendoUI Scheduler while editing the past recurring events, and in other cases the Edit Recurring dialog should not be skipped.

example code:

editable: function(e)
{
   if(e.conditionisTrue)
   {
       editRecurringMode: "dialog"
   }
   else
   {
       editRecurringMode: "occurrence",
   },
   template: kendo.template($("#myCustomEditorTemplate").html())
}

Instead of:

editable: 
{
    editRecurringMode: "dialog",
    template: kendo.template($("#myCustomEditorTemplate").html())
}

Solution

  • Ok, I have solved this problems change by kendo.all.min.js.This is wrong or right i dont know but i have solved my problems.In new version kedno.all.min.js where is

    o.editRecurringMode:"dialog";"series"===a?n()(line no 50) 
    

    and i have replaced by this code"o.editRecurringMode(e):"dialog";"series"===a?n()" in kendo.all.min.js and i have pass param

    editable: {
            //editRecurringMode: "occurrence",
            //editRecurringMode: "series",
            editRecurringMode: function (e) {
    
                if (e.allowAddEdit) {
    
                    return "dialog";
    
                }
    
                else {
    
                    return "occurrence";
                }
    
            },   
    
            template: kendo.template($("#customEditorTemplate").html())
    
        },