Avoid Selection of Weekend and Holiday Dates.

7 posts, 0 answers
  1. Lok
    Lok avatar
    3 posts
    Member since:
    Aug 2010

    Posted 31 Aug 2010 Link to this post

    Hi,
    I'm new to RAD Controls and I was wondering if there is a way to avoid selection of weekend and a list of holiday dates from the the RAD Calendar while using a RadDatePicker?
    Thanks,
    Lok.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 01 Sep 2010 Link to this post

    Hello,

    The following code library demonstrates how you can disable calendar days (e.g. weekend days) in the calendar component of RadDatePicker.
    Disabling calendar days

    Hope this helps,


    Regards,
    Shinu.
  3. Lok
    Lok avatar
    3 posts
    Member since:
    Aug 2010

    Posted 01 Sep 2010 Link to this post

    Thanks Shinu,
    I actually figured that out yesterday after exploring a few things :)
    It wasn't that tough. I really appreciate your quick response and thanks once again!!!

    Regards,
    Lok.
  4. Katte
    Katte avatar
    17 posts
    Member since:
    Jun 2009

    Posted 09 Sep 2010 Link to this post

    I have tried the code samples. It disable the week ends only for the current month. When we goto next month or pervious month, this disable functionality doesn't work. Kindly give me a solution.

    Thanks
    Katte
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 Sep 2010 Link to this post

    Hello Katte,


    You need to handle client-side OnDayRender events of the calendar control for disabling the days on client-side navigation to a different month view.

    Have you added the client side code for disabling the days, as shown in the code library?


    -Shinu.
  6. illumination
    illumination avatar
    85 posts
    Member since:
    May 2008

    Posted 11 May 2011 Link to this post

    Hi Shinu.
    I have done as you instructed for the weekend but now I have to also disable the holidays that resides in the Holiday Table. I need to be able to read dates on the table and apply it in the calendar. I also need to incorporate this process with http://www.telerik.com/community/forums/aspnet-ajax/calendar/two-raddatepickers.aspx 
    Thank you.
  7. Pavlina
    Admin
    Pavlina avatar
    6187 posts

    Posted 17 May 2011 Link to this post

    Hi,

    This can be easily achieved by using special days collection or the DayRender event handler. If the user is the one deciding which day would that be, you can make a case check for the e.Day.Day and set the choice as special day.

    Hope this helps.

    Kind regards,
    Pavlina
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top