Is it possible to allow the user to select only Mondays on a DatePicker?

4 posts, 0 answers
  1. Pooya
    Pooya avatar
    107 posts
    Member since:
    Apr 2011

    Posted 07 Jun 2011 Link to this post

    I'd like to use the DatePicker control:

    Would it be possible to enable only Mondays to be selectable when user wants to pick a date?

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

    Posted 07 Jun 2011 Link to this post

    Hello Pooya,

    You can achieve this by handling both the server-side DayRender and client-side OnDayRender events of the calendar control. The server DayRender event is necessary for disabling the days on initial page load or postback and the client-side DayRender event for disabling the days on client-side navigation to a different month view.

    Check out the following code-library for more on this.
    Disabling calendar days

  3. Gioce90
    Gioce90 avatar
    16 posts
    Member since:
    Nov 2015

    Posted 13 Jun 2016 in reply to Shinu Link to this post


    It is possible do the same thing, but handling the client-side only?

    (I'm trying to use the code-behind the least possible)

  4. Eyup
    Eyup avatar
    3320 posts

    Posted 16 Jun 2016 Link to this post

    Hello Gioce,

    I'm afraid you will need to disable the rendered days on the server. You can use SpecialDays to achieve this requirement. Please examine the web sites provided in the following post:

    I hope they will prove helpful.

    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top