Set viewed month

2 posts, 0 answers
  1. Ian
    Ian avatar
    68 posts
    Member since:
    Jul 2017

    Posted 17 Apr 2018 Link to this post

    How can I create a calendar such that a specific month is displayed?

    For example, I want to open the calendar to initially show next month.

  2. Lance | Manager Technical Support
    Admin
    Lance | Manager Technical Support avatar
    1195 posts

    Posted 17 Apr 2018 Link to this post

    Hi Ian,

    Setting the DisplayDate property to DateTime.Now.AddMonths(1) should set it to the next month. For example:

    private void RadCalendar_OnNativeControlLoaded(object sender, EventArgs e)
    {
        try
        {
            radCalendar.TrySetViewMode(CalendarViewMode.Month);
            radCalendar.DisplayDate = DateTime.Now.AddMonths(1);
        }
        catch (Exception ex)
        {
     
        }
    }

    Regards,
    Lance | Tech Support Engineer, Sr.
    Progress Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top