我正在尝试使用应该触发警报的简单事件来告诉我是否发生了某些事情。不幸的是,唯一触发的事件是保存和添加。每当我 resizeEnd 或 moveEnd 时都会触发保存,这对我来说没有意义。move 甚至没有触发,也没有调整大小。
<head>
<title></title>
<link href="styles/kendo.common.min.css" rel="stylesheet" />
<link href="styles/kendo.default.min.css" rel="stylesheet" />
<script src="js/jquery.min.js"></script>
<script src="js/kendo.web.min.js"></script>
</head>
<body>
<div id="example" class="k-content">
<div id="scheduler"></div>
</div>
<script>
$("#scheduler").kendoScheduler({
date: new Date("2013/6/13"),
startTime: new Date("2013/6/13 12:00 AM"),
height: 600,
allDaySlot: false,
resize: function(e) {
alert('resize');
},
resizeEnd: function(e) {
alert('resizeEnd');
},
move: function(e) {
alert('move');
},
moveEnd: function(e) {
alert("moveEnd");
},
add: function(e) {
alert("add");
},
save: function(e) {
alert('save');
},
views: [
"week",
"month"
],
dataSource: {
schema: {
model: {
id: "eventID",
fields: {
eventID: { type: "number" },
title: { defaultValue: "No title", validation: { required: true } },
start: { type: "date" },
end: { type: "date" },
careGiverId: { nullable: true },
isAllDay: { type: "boolean" }
}
}
}
},
group: {
resources: [ "care" ]
},
resources: [
{
field: "careGiverId",
name: "care",
dataSource: [
{ text: "Jeffery Dohmer (Care Giver 1)", value: 1, color: "#6eb3fa" },
{ text: "David Kaplan (Care Giver 2)", value: 2, color: "#6eb3fa" },
{ text: "Ben Dover (Care Giver 3)", value: 3, color: "#6eb3fa" }
],
title: "Care"
}
]
});
</script>
我已经阅读了文档,似乎我做的一切都是正确的。