# MaskDateTimeProvider

The MaskDateTimeProvider is responsible for the parsing of the dates. The MaskDateTimeProvider can be accessed by casting to that appropriate class. This provider contains useful properties and methods that can help you to navigate trough the date parts.

* The **AutoSelectNextPart** property controls whether or not the next date part will be automatically selected when the user types.

* The **SelectedItemIndex** property can be used to retrieve the current selected part of the date.

* The **SelectFirstItem** method just selects the first part of the date.

* The **SelectNextItem** method just selects the last part of the date.

The following code spinet demonstrates how one can access and use the provider:

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

```VB.NET
Dim provider As MaskDateTimeProvider = TryCast(Me.radDateTimePicker1.DateTimePickerElement.TextBoxElement.Provider, MaskDateTimeProvider)
provider.AutoSelectNextPart = True
```

> note
> The **MaskProviderCreated** event will be fired each time when new provider instance is created. For example when the MaskType is changed.

## See Also

* [Design Time](https://www.telerik.com/products/winforms/documentation/controls/editors/datetimepicker/design-time)
* [Free Form Date Time Parsing](https://www.telerik.com/products/winforms/documentation/controls/editors/datetimepicker/free-form-date-time-parsing)
* [Properties](https://www.telerik.com/products/winforms/documentation/controls/editors/datetimepicker/raddatetimepicker-properties)
* [Structure](https://www.telerik.com/products/winforms/documentation/controls/editors/datetimepicker/overview)
