switch datetimepicker navigation buttons

2 posts, 0 answers
  1. ShareDocs
    ShareDocs avatar
    91 posts
    Member since:
    Oct 2012

    Posted 04 Mar 2013 Link to this post

    is there a way to switch the raddatetimepicker navigation buttons so the right arrow will go backwards and the left will go forward?
    i also want to set the fastnavigation button (two arrows button) number of periods through the designer.

    so far i've accomplished this by:
    ((RadDateTimePickerCalendar)this.dtpFromTaarich.DateTimePickerElement.GetCurrentBehavior()).Calendar.Navigating +=
                   new CalendarNavigatingEventHandler(dtp_Navigating);
    void dtp_Navigating(object sender, Telerik.WinControls.UI.CalendarNavigatingEventArgs e)
               if (e.Direction == Telerik.WinControls.UI.CalendarNavigationDirection.Forward)
                   if (!e.IsFastNavigation)
                       e.StartDate = (sender as RadCalendar).CalendarElement.View.ViewStartDate.AddMonths(-1);
                       e.StartDate = (sender as RadCalendar).CalendarElement.View.ViewStartDate.AddMonths(-12);
               else if (!e.IsFastNavigation)
                   e.StartDate = (sender as RadCalendar).CalendarElement.View.ViewStartDate.AddMonths(1);
               else e.StartDate = (sender as RadCalendar).CalendarElement.View.ViewStartDate.AddMonths(12);
    hope i can do it more easily... and with less code :)
  2. Peter
    Peter avatar
    1159 posts

    Posted 05 Mar 2013 Link to this post

    Hi Lior,

    Thank you for writing.

    Your solution is correct and this is an easiest way to swap the fast navigation buttons. 
    We will consider swaping these buttons when the RightToLeft property is set to true - I have logged this as a feature request in our Public Issue Tracking System.

    For the time being you should continue to use your solution. 
    I updated your Telerik points for request and for the sharing your solution with us.

    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Join us for a FREE webinar to see all the new stuff in action.

    Interested, but can’t attend? Register anyway and we’ll send you the recording.
Back to Top