Completed
Last Updated: 05 Jun 2014 07:07 by ADMIN
ADMIN
Peter
Created on: 04 Mar 2013 08:39
Category: Editors
Type: Feature Request
0
IMPROVE. RadDateTimePicker navigation buttons should be swapped when Control is in RTL mode
Workaround:
((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);
               else
                   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);
       }

Resolution: You need to set the RightToLeft property to Yes of CalendarBehavior
RadDateTimePickerCalendar calendarBehavior = this.radDateTimePicker1.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar;
RadCalendar calendar = calendarBehavior.Calendar as RadCalendar;
calendar.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
0 comments