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

Commands

Updated on Oct 1, 2025

This article provides an information about the following commands that RadDateTimePicker exposes through the RadDateTimePickerCommands static class:

  • SetToday Command

  • Close Command

SetToday Command

Using the SetToday command the current date of RadDateTimePicker could be set to the current date (today).

In Example 1 a Button is linked to the RadDateTimePickerCommands.SetToday command after whose execution the date will be set to the current day:

Example 1: SetToday command

XAML
	<telerik:RadDateTimePicker x:Name="dateTimePicker1" />
	<telerik:RadButton Command="{x:Static telerik:RadDateTimePickerCommands.SetToday}" 
					   CommandTarget="{Binding ElementName=dateTimePicker1}" 
					   Content="Set Today"/>

Close Command

The Close command closes the drop down part of RadDateTimePicker if it is opened.

The following example shows how to close the drop down of RadDateTimePicker by executing the Close command:

C#
	RadDateTimePickerCommands.Close.Execute(null, this.dateTimePicker1);

See Also