New to Telerik UI for WinFormsStart a free 30-day trial

Specify the Minutes/Hours Step in DateTimePicker's Popup

Updated over 6 months ago

Environment

Product VersionProductAuthor
2023.2.606RadDateTimePicker for WinFormsDesislava Yordanova

Description

By default, when the time picker is enabled for RadDateTimePicker, the minutes step is 5 minutes:

datetimepicker-steps-in-popup001

This article shows how to control the step for the minutes selector in the popup.

Solution

The hosted RadDateTimePickerCalendar contains a TimePickerElement that offers Step property:

C#
    
this.radDateTimePicker1.DateTimePickerElement.ShowTimePicker = true;
RadDateTimePickerCalendar calendarBehavior = this.radDateTimePicker1.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar;
calendarBehavior.TimePicker.TimePickerElement.Step = 1;
calendarBehavior.Calendar.MinimumSize= new Size(300,0);

The achieved result is illustrated below:

datetimepicker-steps-in-popup002

In this article
EnvironmentDescriptionSolution
Not finding the help you need?
Contact Support