我已经设置了这个 js fiddle ,这样如果调度程序中的元素与现有元素时隙(1:1 作为元素:时隙)冲突,则无法更新该元素
如何扩展此功能,以便您无法将元素从网格拖动到调度程序中不可用的时间段中?目前它将水平堆叠元素。
最佳答案
How could I extend this functionality so you cannot drag an element from the grid into an unavailable timeslot in the scheduler
不可用的时间段可能意味着任何事情,具体取决于您的情况,但一般来说,如果我没有记错的话,这意味着具有 k-非工作时间类别的灰色时间段。只需添加您的 if 条件即可
if (!$(e.dropTarget).hasClass("k-nonwork-hour") && !timeSlotOccupied(slot.startDate,slot.endDate,dataItem) && dataItem && slot)
关于javascript - 将元素从剑道网格拖动到剑道调度程序时检测碰撞,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31299889/