Colors 如何在Kendo.Scheduler中自定义行或列的颜色?
有没有办法自定义kendo.Scheduler行和列的颜色?如果有,让我知道怎么做! 更新1> 这就是答案>Colors 如何在Kendo.Scheduler中自定义行或列的颜色?,colors,kendo-ui,customization,rows,kendo-scheduler,Colors,Kendo Ui,Customization,Rows,Kendo Scheduler,有没有办法自定义kendo.Scheduler行和列的颜色?如果有,让我知道怎么做! 更新1> 这就是答案> view.table.find("td[role='gridcell']").each(function () { if ($(this) != null) { var element = $(this); if (element != null) { var slot = sch
view.table.find("td[role='gridcell']").each(function () {
if ($(this) != null) {
var element = $(this);
if (element != null) {
var slot = scheduler.slotByElement(element);
if (slot != null) {
var dateSlot = slot.startDate;
if ("20/09/2014 14:00"== dateSlot.toString())
element.addClass("red");
}
}
}
});
您还必须添加以下css:
.k-scheduler .k-today.red {
background: #ff6f7b; /*When the slot is today*/
}
.red {
background: #ff6f7b;
}
.k-scheduler .k-state-selected.red { /*The color when you select the slot*/
background: #4070B8;
}
这是一个由调度人员组成的程序包,它的形式是:一个由调度人员组成的程序包、一个由调度人员组成的程序包、一个由调度人员组成的程序包、一个由调度人员组成的程序包、一个由调度人员组成的程序包、一个由调度人员组成的程序包和一个由调度人员组成的程序包,但当我选择一个插槽时,它不是应该的蓝色,我如何解决这个问题?太棒了,你救了我一天:)
function scheduler_dataBound(e) {
var scheduler = $("#scheduler").data("kendoScheduler");
var view = scheduler.view();
view.table.find("td[role=gridcell]").each(function () {
if ($(this) != null) {
var element = $(this);
if (element != null) {
var slot = scheduler.slotByElement(element);
if (slot != null)
if (slot.startDate, slot.endDate, == "youre times")
element.addClass("youre css clas name ");
}
}
});