Hi,
In Kendo Scheduler I need to add colour to the slots based on the start and End date
(i.e.) If startdate is Monday 10AM and EndDate is Tuesday 12PM means inbetween the slots are need to fill with yellow colour refer to not available period.
The start and End days are dynamically changed based on that the slots colour are need to change.
currently I am using the following code to colored but it take long time to process. It took each slot one by one by.
I need based on start and End date, the in between slots are need to colored in a single shot itself, it should not loop for each and every slots in the table.
view.table.find("td[role=gridcell]").each(function () {
if ($(this) != null) {
var selectSlot = $(this)
var slot = scheduler.slotByElement(selectSlot);
/Comparing the start and Endate and coloured
if ((slot.startdate >= startdate) && (slot.enddate <= enddate) //dummy conditions
selectSlot.addClass("slot-selected");
}
});