Change editRecurringMode dynamically on editable template in kendo scheduler

帅比萌擦擦* 提交于 2019-12-08 13:43:26

问题


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())
}

回答1:


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())

    },


来源:https://stackoverflow.com/questions/32502479/change-editrecurringmode-dynamically-on-editable-template-in-kendo-scheduler

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!