Limit Date choices of RadDatePicker

6 posts, 1 answers
  1. Chris Marisic
    Chris Marisic avatar
    30 posts
    Member since:
    Sep 2009

    Posted 11 Feb 2010 Link to this post

    How can I configure my RadDatePicker to only allow me to pick the first of each month?
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 12 Feb 2010 Link to this post

    Hello Chris Marisic,

    I hope you want to disable some days in the RadDatePicker. You can refer to the following article for more information about how to disable calendar days in the calendar component of RadDatePicker.
    Disabling calendar days

    -Shinu.
  3. Chris Marisic
    Chris Marisic avatar
    30 posts
    Member since:
    Sep 2009

    Posted 12 Feb 2010 Link to this post

    Shinu,

    I appreciate the response but is that really the only way to solve this to implement custom javascript that rewrites the DOM? Is there really no better programmatic way that I can set the calendar to correctly limit my days?

    Update
    I do see the equivalent is implemented in the code file, still that's alot of work when you should just be able to do like Calendar.AcceptedDays = new RadDateArray {}.... but atleast that's usable to me.
  4. Chris Marisic
    Chris Marisic avatar
    30 posts
    Member since:
    Sep 2009

    Posted 18 Feb 2010 Link to this post

    Shinu,

    After using the solution you posted it does indeed work on the first month when you open up the calendar however after subsequent changes to other months sometimes the dates will become selectable for any date.
  5. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 23 Feb 2010 Link to this post

    Hi Chris,

    Could you please confirm that you handled the client-side OnDayRender event of the picker Calendar as shown in the code library sample?

    Additionally, if you want to disable the desired days for other months server-side try setting the picker AutoPostBack property to true and see if it makes any difference.

    Greetings,
    Iana
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Chris Marisic
    Chris Marisic avatar
    30 posts
    Member since:
    Sep 2009

    Posted 23 Feb 2010 Link to this post

    I was not using the client side event also I mistakenly thought the article presented both ways to handle it server side or client side not that it required both.
Back to Top