How to disable certain days on scheduler?

4 posts, 0 answers
  1. Ming Yang
    Ming Yang avatar
    8 posts
    Member since:
    Oct 2006

    Posted 07 May 2008 Link to this post

    Hi, I have some questions on how to use the scheduler:
    1. How to block some days on the scheduler so that the users cannot schedule any appointments on that day? Is there any way to show those days with a different Css style so that users know it is not meant to be clicked?
    2. Is there a way to disable the Navigation icon on certain months so that users know it cannot be clicked?
    3. Is there a way to setup Apponitment CssClass in DESIGN time? I know how to set it up in running time at code and feel that it would be nice if I can do it in design time. Yet I cannot figure it out.

  2. Peter
    Peter avatar
    6637 posts

    Posted 12 May 2008 Link to this post

    Hi Ming,

    1. You can check for the Start time of the TimeSlot object and set your custom css class accordingly:
    protected void RadScheduler1_TimeSlotCreated(object sender, TimeSlotCreatedEventArgs e)  
        //The code bellow will apply a Custom CssClass to all timeslots which   
        //are before the today's day including today:  
        if (e.TimeSlot.Start.CompareTo(DateTime.Now) == -1)  
            e.TimeSlot.CssClass = "Custom";  

    We will also expose a TimeSlot.Enabled property which if set to false will prevent inserting appointments for this timeslot. Meanwhile you can workaround this limitation cancelling the OnClientAppointmentInserting event based on your custom condition: 

    function OnClientAppointmentInsertingHandler(sender, eventArgs)  

    2. Which navigation icon do you mean? You can open a support ticket and send us a screenshot to help us better understand what you would like to achieve.

    3. Currently, RadScheduler does not support setting CssClass property for appointments in design time, but we will consider this suggestion.

    If you have any other questions, please feel free to contact us.

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft R3 2016 release webinar banner
  4. Zoinky
    Zoinky avatar
    45 posts
    Member since:
    Sep 2007

    Posted 22 Dec 2008 Link to this post

    was TimeSlot.Enabled  ever implemented? if not when can we expect this?
  5. Peter
    Peter avatar
    6637 posts

    Posted 23 Dec 2008 Link to this post

    Hello Zoinky,

    There will be TimeSlot.ReadOnly property which we will implement in the near future. For now you will have to use the workaround from the kb article.

    Thanks for your inquiry.

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top