New to Kendo UI for jQuery? Start a free 30-day trial

Get the time slot from given horizontal (x) and vertical (y) position.

Parameters:xPositionNumber

The horizontal position.

yPositionNumber

The vertical position.

Returns:Object

The time slot.

<div id="scheduler"></div>
<script>
$("#scheduler").kendoScheduler({
  date: new Date("2013/6/6")
});

/* The scheduler in this example should be fully rendered correct results of slotByPosition()  */
setTimeout(() => {
    var scheduler = $("#scheduler").data("kendoScheduler");
    var slot = scheduler.slotByPosition(300, 300);

    if (slot) {
      /* The result can be observed in the DevTools(F12) console of the browser. */
      console.log("slot startDate: " + slot.startDate);
      /* The result can be observed in the DevTools(F12) console of the browser. */
      console.log("slot endDate: " + slot.endDate);
    }
  }, 200);
</script>
Not finding the help you need?
Contact Support