This is a migrated thread and some comments may be shown as answers.

Can I have just month and year picker?

1 Answer 1112 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Pavel
Top achievements
Rank 1
Pavel asked on 05 Jan 2017, 04:41 PM

For my currently application, I just need to select a month.

Is there a way to it with this control?

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 06 Jan 2017, 09:17 AM
Hello Pavel,

Here is how you can select only the month:
public RadForm1()
{
    InitializeComponent();
 
    radDateTimePicker1.Format = DateTimePickerFormat.Custom;
    radDateTimePicker1.CustomFormat = "MMMM";
 
    this.radDateTimePicker1.DateTimePickerElement.Calendar.HeaderNavigationMode = HeaderNavigationMode.Zoom;
    this.radDateTimePicker1.DateTimePickerElement.Calendar.ZoomLevel = ZoomLevel.Months;
    this.radDateTimePicker1.DateTimePickerElement.Calendar.ZoomChanging += Calendar_ZoomChanging;
}
 
private void Calendar_ZoomChanging(object sender, CalendarZoomChangingEventArgs e)
{
    e.Cancel = true;
    
}

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Pavel
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or