Can I have just month and year picker?

2 posts, 1 answers
  1. Pavel
    Pavel avatar
    32 posts
    Member since:
    Sep 2016

    Posted 05 Jan 2017 Link to this post

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

    Is there a way to it with this control?

  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    2736 posts

    Posted 06 Jan 2017 Link to this post

    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.
Back to Top