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

Disable multiple selection

1 Answer 150 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Nathan
Top achievements
Rank 1
Nathan asked on 27 Jun 2014, 08:22 PM
Hi,

Is there any way to disable multiple selection of time slots in the control please?

I only want the user to be able to select half hour slots and for them not to be able to extend it past the half hour slot?

Thanks for your help

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 02 Jul 2014, 03:24 PM
Hello Nathan,

Thank you for contacting Telerik Support.

I would suggest you to use jQuery, in order to handle the mouseup event on the contentTable of the RadScheduler. Then you could clear the slots selections and reset only the first slot clicked. Please consider the following implementation :

<script type="text/javascript">
       function pageLoad() {
           var scheduler = $find("RadScheduler1");
           $telerik.$(".rsContentTable").on("mouseup", function (e) {
               var firstSelectedSlot = scheduler.get_selectedSlots()[0];
               alert("only one slot can be selected")
               scheduler._clearSlotSelection();
               firstSelectedSlot.set_selected(true);
           })
       }
   </script>

Hope this would help. I will be glad to assist you any further.

Regards,
Nencho
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Scheduler
Asked by
Nathan
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or