如何在KendoUI Scheduler控件中捕获空单元格单击事件

时间:2014-10-16 19:21:39

标签: javascript kendo-ui kendo-scheduler

我使用下面的代码来捕获Kendo Scheduler事件上的click事件。

      $(document).on("click", ".k-event", function (e) {......

但只有当我点击" items / events"它才会生火。在调度程序上。我想抓住空单击的事件。

这样写,但没有用

      $(document).on("click", ".k-nonwork-hour", function (e) {
          alert(d);
      });

1 个答案:

答案 0 :(得分:1)

你可以在选项中添加onEdit处理程序:

edit: function(editEvent){
  if(editEvent.event.isNew()){
   editEvent.preventDefault(); // to stop edit dialog from appearing
   // call you custom code here:
  }
}
相关问题