我尝试使用batch:true,例如示例页面: https://demos.telerik.com/kendo-ui/scheduler/index
将“批次”更改为FALSE并创建一个事件,因此,如果尝试编辑此事件并单击“取消”按钮,则该事件消失,但是如果将其设置为TRUE,则单击em时事件不再消失按钮。
在我的代码中,我的数据源是一个对象,在这种情况下,我不知道如何使用批处理,因为批处理:true也需要像这样插入到数据源中:
dataSource: {
batch: true,
我的鳕鱼是:
$("#scheduler").kendoScheduler({
date: new Date(),
startTime: new Date(),
height: 600,
edit: scheduler_edit,
editable: {
editRecurringMode: "series"
},
views: [
"month"
],
dataSource: dataSourceScheduler,
save: onSaveEvent,
resources: [
{
field: "isRestrictionTime",
name: "isRestrictionTime",
title: "Exception",
dataSource: [
{ text: "Not Exception", value: 0, color: "#B6E5F9"},
{ text: "Exception", value: 1, color: "#FBCCD0"}
]
}
]
});
和
function initSchedulerDatasource(){
dataSourceScheduler = new kendo.data.SchedulerDataSource({
schema: {
model: {
id: "taskId",
fields: {
taskId: { from: "taskId", type: "number" },
title: { from: "title", defaultValue: "No title", validation: { required: true } },
start: { type: "date", from: "start" },
end: { type: "date", from: "end" },
startTimezone: { from: "startTimezone" },
endTimezone: { from: "endTimezone" },
description: { from: "description" },
recurrenceId: { from: "recurrenceId" },
recurrenceRule: { from: "recurrenceRule" },
recurrenceException: { from: "recurrenceException" },
isRestrictionTime: { from: "isRestrictionTime", defaultValue: 0 },
isAllDay: { type: "boolean", from: "isAllDay" }
}
}
}});
}