Scheduling appoinments during time box/slot

2 posts, 0 answers
  1. Alex
    Alex avatar
    31 posts
    Member since:
    Jun 2011

    Posted 07 Nov 2013 Link to this post

      Is there an easy way to define a time box for a set of days within which appointment may be scheduled?  For example, I would like to define Mondays and Wednesday between 9AM and 5PM as a region which appointments can be made.  I would like it to be visually obvious (I think this can be done with SpecialDays and the handler for slot created if nothing else.
  2. Hristo Valyavicharski
    Hristo Valyavicharski avatar
    975 posts

    Posted 11 Nov 2013 Link to this post

    Hi Alex,

    Try to handle OnTimeSlotCreated event and set a css class for the time you don't want to schedule appointments:
    <style type="text/css">
        .Disabled {
            background: silver !important;
            cursor: not-allowed;

    protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)
        if (e.TimeSlot.Start.Hour < 9 ||  e.TimeSlot.Start.Hour > 17)
            e.TimeSlot.CssClass = "Disabled";

    Finally cancel appointment inserting if is clicked on a time slot, that is out of the defined time span:
    function OnClientAppointmentInserting(sender, eventArgs) {
        var slotElement = $telerik.$(eventArgs.get_targetSlot().get_domElement());
        if (".Disabled") || slotElement.parent().is(".Disabled") ||".rsOtherMonth") || slotElement.parent().is(".rsOtherMonth")
        ||".rsNonWorkHour") || slotElement.parent().is(".rsNonWorkHour")) {
            // Prevent appointment inserting on holidays.

    There is an online demo, which actually shows the same functionality.

    Hristo Valyavicharski
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. DevCraft R3 2016 release webinar banner
Back to Top