RadCalendar arrow key navigation

3 posts, 0 answers
  1. Lou
    Lou avatar
    61 posts
    Member since:
    Aug 2014

    Posted 09 Mar 2015 Link to this post

    Hi, I would like to allow the user to change the currently selected RadCalendar day based on the arrow keys (as well as the mouse). How would I do that?
    (It seems that using the arrow keys does not fire the RadCalendar.SelectionChanged event.)

    Thanks,

    -Lou
  2. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 10 Mar 2015 Link to this post

    Hi Lou,

    Thank you for writing.

    You can use the PropertyChanged event of the control to detect when the FocusedDate is getting changed (which will be changed when the arrow keys are pressed) and in it, set the control's SelectedDate:
    void radCalendar1_PropertyChanged(object sender, PropertyChangedEventArgs e)
    {
        if (e.PropertyName == "FocusedDate")
        {
            radCalendar1.SelectedDate = radCalendar1.FocusedDate;
     
        }
    }

    I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.

    Regards,
    Stefan
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Lou
    Lou avatar
    61 posts
    Member since:
    Aug 2014

    Posted 10 Mar 2015 in reply to Stefan Link to this post

    Thanks, that works !

    -Lou
Back to Top