0

is there a way for me to format the raddatetimepicker to have a month and year view on selection view?..

something like this..

enter image description here

what I have tried so far is this:

dateStartDate.Value = DateTime.Now;
dateStartDate.Format = DateTimePickerFormat.Custom;
dateStartDate.CustomFormat = "MMMM - yyyy";
dateStartDate.ShowUpDown = true;

enter image description here

but it doesn't show the view anymore instead gives me an up and down button to change the month....

I am Using C# as my language and telerik..... and this is a windows form...

Sam Teng Wong
  • 2,379
  • 5
  • 34
  • 56

1 Answers1

0

Not sure if you have read this or not, but I think it'd certainly help point you to the right direction.

Customize RadCalendar Programmatically

Essentially, you will need to get a reference of RadCalendar from your RadDateTimePicker control, and from there, you can start customising its calendar view based on your own need.

RadDateTimePickerCalendar calendarBehavior = this.dateStartDate.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar;
RadCalendar calendar = calendarBehavior.Calendar as RadCalendar;
RadCalendarElement calendarElement = calendar.CalendarElement as RadCalendarElement;

Update

In your case, I think you will be looking at the ZoomLevel of RadClaendar. Something like this

calendar.HeaderNavigationMode = HeaderNavigationMode.Zoom;
calendar.ZoomLevel = ZoomLevel.Months;

Customize Zoom Navigation

woodykiddy
  • 6,074
  • 16
  • 59
  • 100
  • this seems interesting and I haven't read this yet.... so is it possible to remove the calendar days and replace it with months? – Sam Teng Wong May 18 '16 at 00:20
  • it appears that `telerik.UI.RadCalendar` does not contain a definition `HeaderNavigationMode`... same with `ZoomLevel`... – Sam Teng Wong May 18 '16 at 03:29
  • @SamTengWong well would it be possible for you to update your telerik library? Not sure what version you are on though. – woodykiddy May 18 '16 at 06:34
  • it's 2013 version....., I cannot upgrade it..,I need permission from the company to do it... what version of telerik will support `HeaderNavigationMode` and `ZoomLevel`? – Sam Teng Wong May 18 '16 at 06:51
  • @SamTengWong Well you might wanna browser through the release history. http://www.telerik.com/support/whats-new/winforms/release-history – woodykiddy May 18 '16 at 07:26