This is a migrated thread and some comments may be shown as answers.

Select slots programmatically in monthly timeline

1 Answer 150 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Sebastian
Top achievements
Rank 1
Sebastian asked on 18 Jun 2020, 01:51 PM

Hello,

I am trying to implement some conditional selection of slots in monthly timeline of scheduler. I looked at an example provided here:
https://demos.telerik.com/kendo-ui/scheduler/timeline
and modified this example by adding the following code to scheduler definition (link to dojo snippet: https://dojo.telerik.com/eciQugem):

          selectable: true,
          change: function (e) {
            var start = e.start;
            var end = e.end;
            e.sender.select({start: start, end: end});
          },

Adding this allows to select slots in row 0 (by default - as expected), but I want to be able to select slots in any row. The documentation suggests I should specify resources in options.resources, but I have no idea what should I put there and having given it a few shots I constantly encounter errors. Could you provide me with an updated dojo example that shows how to achieve it?

1 Answer, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 22 Jun 2020, 10:46 AM

Hello Sebastian,

Here's a modified dojo example, which shows how to use the resources when selecting a slot: https://dojo.telerik.com/IPAfaXaz/3

With the room resource value being passed to the select method, the first slot within each room row will be selected. If you pass the attendee value as well (commented in the linked dojo), the behavior will be the default one - every slot would be selectable.

Regards,
Ivan Danchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Scheduler
Asked by
Sebastian
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
Share this question
or