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

Providers

Updated on May 7, 2026

RadDateTimePicker uses an embedded RadMaskedEditBox as its text editor. The text input validation and formatting is handled by a mask provider, which implements the IMaskProvider interface. Each provider type corresponds to a specific MaskType value and is responsible for parsing, validating, and formatting user input.

The following table lists the available providers that can be used with RadDateTimePicker:

MaskTypeProviderDescription
MaskType.DateTimeMaskDateTimeProviderValidates and formats DateTime values with mask-based editing.
MaskType.FreeFormDateTimeFreeFormDateTimeProviderAllows free-form date and time input without strict mask restrictions.

Accessing the Provider

The provider is accessible through the DateTimePickerElement.TextBoxElement.Provider property. Cast it to the appropriate type to access the specific API:

C#
MaskDateTimeProvider provider = this.radDateTimePicker1.DateTimePickerElement.TextBoxElement.Provider as MaskDateTimeProvider;

To change the provider type, set the MaskType property on the embedded text editor:

C#
this.radDateTimePicker1.DateTimePickerElement.TextBoxElement.MaskType = MaskType.FreeFormDateTime;

MaskDateTimeProvider

The MaskDateTimeProvider is the default provider used by RadDateTimePicker. It validates values of type DateTime and provides mask-based editing where the user navigates between individual date and time parts (day, month, year, hour, minute, and similar).

Key Properties

PropertyTypeDescription
AutoSelectNextPartboolControls whether the next date part is automatically selected when the user finishes typing in the current part.
EnableKeyNavigationboolEnables or disables the selection of the next or previous part with the arrow keys.
SelectedItemIndexintGets or sets the index of the currently selected date part.
AutoCompleteYearboolIndicates whether to auto-complete years on user input.
YearResetValueintDetermines the year value when it has been reset.
HoursStepintGets or sets the step used when incrementing or decrementing the hours.
MinutesStepintGets or sets the step used when incrementing or decrementing the minutes.
SecondsStepintGets or sets the step used when incrementing or decrementing the seconds.
MillisecondsStepintGets or sets the step used when incrementing or decrementing the milliseconds.
MinDateDateTimeGets or sets the minimum allowed date.
MaxDateDateTimeGets or sets the maximum allowed date.

Key Methods

MethodDescription
SelectFirstItem()Selects the first part of the date.
SelectNextItem()Selects the next selectable date/time part in the current mask order.

Example

C#
MaskDateTimeProvider provider = this.radDateTimePicker1.DateTimePickerElement.TextBoxElement.Provider as MaskDateTimeProvider;
provider.AutoSelectNextPart = true;
provider.MinutesStep = 5;
provider.SecondsStep = 10;

For Arabic, Persian, and Hijri calendars, the ArabicMaskDateTimeProvider is automatically used instead of the standard MaskDateTimeProvider. It provides culture-specific support for these calendar systems.

FreeFormDateTimeProvider

The FreeFormDateTimeProvider extends MaskDateTimeProvider and allows free-form date and time input. Instead of strict mask-based editing, users can type dates in various formats, and the provider parses the input using a formal grammar algorithm.

To enable free-form input, set the MaskType to FreeFormDateTime:

C#
this.radDateTimePicker1.DateTimePickerElement.TextBoxElement.MaskType = MaskType.FreeFormDateTime;

Key Properties

The FreeFormDateTimeProvider inherits all properties from MaskDateTimeProvider and adds:

PropertyTypeDescription
ParserDateInputGets or sets the parser used for flexible date and time input parsing.

For more details on the parsing logic, refer to the Free Form Date Time Parsing article.

MaskProviderCreated Event

The MaskProviderCreated event fires each time a new provider instance is created, for example, when the MaskType property is changed. You can use this event to configure the provider after it has been created:

C#
this.radDateTimePicker1.DateTimePickerElement.TextBoxElement.MaskProviderCreated += TextBoxElement_MaskProviderCreated;

private void TextBoxElement_MaskProviderCreated(object sender, EventArgs e)
{
    MaskDateTimeProvider provider = this.radDateTimePicker1.DateTimePickerElement.TextBoxElement.Provider as MaskDateTimeProvider;
    if (provider != null)
    {
        provider.AutoSelectNextPart = true;
    }
}

See Also