Getting the right month in Monthview

2 posts, 0 answers
  1. Espen Fosshaug
    Espen Fosshaug avatar
    18 posts
    Member since:
    Sep 2009

    Posted 04 Feb 2012 Link to this post

    Hi.

    In monthview the name of the month that is displayed in the header. This is always right even if the first day in the view is from the previous month.
    I need to get this! 
    VisibleRangeStart.Month gets the previous month, and selecteddate.month looks random.

    I need this because I am creating a MonthPlan as a pdf that starts on the first monday of the Month. This is created from the displayed month. I can find the first monday, but I need to be on the correct month.

    Please help.
  2. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 08 Feb 2012 Link to this post

    Hi,

    Try to subscribe to the NavigationComplete event, and get the SelectedDate out of RadScheduler in the event handler. The currently selected month is always accurate in this method when a navigation occurs.
    private DateTime currentDate;
    protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e)
    {
        currentDate = RadScheduler1.SelectedDate;
    }

    I hope this helps.

    All the best,
    Ivana
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top