Show Only Certain Months in RadCalendar

4 posts, 0 answers
  1. Brendan Enrick
    Brendan Enrick avatar
    28 posts
    Member since:
    Jul 2009

    Posted 24 Sep 2009 Link to this post

    Hello,

    I am using the calendar with three months showing at a time. I want the control's default view to have the current month be on the right and have last month in the middle and two months ago on the left. Is there an easy way to do this? I looked at the documentation and did not see how.

    Thanks,
    Brendan
  2. Brendan Enrick
    Brendan Enrick avatar
    28 posts
    Member since:
    Jul 2009

    Posted 28 Sep 2009 Link to this post

    Hi,

    Sorry about the second post. Just want to make sure the post doesn't fall through the cracks here. Perhaps I should refine my explanation a bit.

    Basically I have the calendar configured to show 3 months. They are the following months.
    [this month] [next month] [two months from now]

    Instead of showing those three months I want it to default to.
    [two months ago] [last month] [this month]

    I greatly appreciate any and all help you can offer.

    Thanks,
    Brendan
  3. DevCraft banner
  4. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 30 Sep 2009 Link to this post

    Hello Brendan Enrick,

    Sorry for the late response. You may consider using the DisplayDate property of the RadDatePicker. Check the code posted bellow, that is giving the answer to your question:

    calendar.DisplayDate = DateTime.Now.AddMonths(-2);

    Hope this helps.

    Best wishes,
    Kaloyan
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Brendan Enrick
    Brendan Enrick avatar
    28 posts
    Member since:
    Jul 2009

    Posted 30 Sep 2009 Link to this post

    Thanks Kaloyan that worked very well. Not sure how I didn't find that.
    Brendan
Back to Top