Disable holidays and Week ends in Date picker

4 posts, 0 answers
  1. Dev
    Dev avatar
    3 posts
    Member since:
    Apr 2013

    Posted 22 Apr 2013 Link to this post

    I dont see any solution for disabling week ends and special days in date picker.
    Any workarounds?
    There is a solution for weekends, but we have to do server,client side code. But For special days?Holidays?
    the special days are by a caculation on server side, so doing this on client side as well is going to be hard..:(
    Shouldn't it be a simple propery to disable?

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Apr 2013 Link to this post


    You can try the approach mentioned in the following code library.
    Disabling calendar days

  3. DevCraft R3 2016 release webinar banner
  4. Dev
    Dev avatar
    3 posts
    Member since:
    Apr 2013

    Posted 23 Apr 2013 Link to this post

    Thanks Shinu.
    But I already tried this with no luck. They just disabling the current month. If click next month then, could be able to select the disabled dates. This case, have to implement client side script to disable.
    So i think, we need to do the same action at both client  and server side.
    This will be an issue for us, as we are dynamically disable dates at server side.

  5. Eyup
    Eyup avatar
    2942 posts

    Posted 26 Apr 2013 Link to this post


    I have already replied to your query in your support ticket 686818. I will repeat the approach here so other users with similar issues make avail:
    Does enabling the AutoPostBack property of the calendar works for you?
    <telerik:RadCalendar ID="RadCalendar3" runat="server" OnDayRender="RadCalendar3_DayRender" AutoPostBack="true">
    protected void RadCalendar3_DayRender(object sender, Telerik.Web.UI.Calendar.DayRenderEventArgs e)
        if (e.Day.IsWeekend)
            RadCalendarDay weekendDay = new RadCalendarDay();
            weekendDay.Date = e.Day.Date;
            weekendDay.IsSelectable = false;
            (sender as RadCalendar).SpecialDays.Add(weekendDay);

    Hope this helps.

    the Telerik team
    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 their blog feed now.
Back to Top