我正在尝试为剑道调度程序定义单独的营业时间。剑道调度程序只为每个工作日使用一个开始/结束时间。我想专门定义每一天的开始/结束时间(即星期一与星期二的时间不同)。
最近有人问了这个问题
http://www.telerik.com/forums/set-business-hours-for-individual-days
我想知道是否有人扩展了视图以添加类似的功能。
我无权访问视图的非缩小版本(kendo.ui.DayView、kendo.ui.WeekView)。基于 kendo.scheduler.dayview.min.js 文件,我假设我必须扩展 DayView,并覆盖 _content 函数,但是我无法将该函数的缩小版本复制到扩展视图中.
我目前正在使用 jQuery 循环遍历时间段,以便在数据绑定事件上为此添加一个 css 类,但是,如果您在每周视图中并且将主要刻度设置为 5,则性能可能会非常糟糕。
遍历时隙的代码类似于 http://www.telerik.com/forums/color-code-resource-unavailable-days-hours
dataBound: function (e) {
var scheduler = this;
var view = scheduler.view();
view.table.find("td[role=gridcell]").each(function () {
var element = $(this);
var slot = scheduler.slotByElement(element);
//your custom logic based on the slot object
if (true) {
element.addClass("customClass");
}
})
}