# Getting Started

The **RadTimePicker** is a control that displays a range of times from which the user can select a single time. It essentially inherits [RadDateTimePicker](https://www.telerik.com/products/wpf/documentation/controls/raddatetimepicker/getting-started) and sets the **InputMode** property to **TimePicker**.

## Adding Telerik Assemblies Using NuGet

To use **RadTimePicker** when working with NuGet packages, install the `Telerik.Windows.Controls.Input.for.Wpf.Xaml` package. The [package name may vary](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/available-packages) slightly based on the Telerik dlls set - [Xaml or NoXaml](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/xaml-vs-noxaml)

Read more about NuGet installation in the [Installing UI for WPF from NuGet Package](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/nuget/nuget-installation) article.

> tip With the 2025 Q1 release, the Telerik UI for WPF has a new licensing mechanism. You can learn more about it [here](https://www.telerik.com/products/wpf/documentation/installation/licensing/installing-license-key).

## Adding Assembly References Manually

If you are not using NuGet packages, you can add a reference to the following assemblies:

* **Telerik.Licensing.Runtime**
* **Telerik.Windows.Controls**
* **Telerik.Windows.Controls.Input**

You can find more info [here](https://www.telerik.com/products/wpf/documentation/common-information/installation-installing-dependencies-wpf).

## Setting the SelectedTime

The **SelectedTime** property holds the selected time. Examples 1 and 2 demonstrate how you can set this property in xaml and code behind. For more information, check out the [Selection](https://www.telerik.com/products/wpf/documentation/controls/raddatetimepicker/features/selection) article of the **RadDateTimePicker**.

**Example 1: Setting the SelectedTime in xaml**

```XAML
<telerik:RadTimePicker x:Name="timePicker" SelectedTime="15:00" />
```

**Example 2: Setting the SelectedTime in code**

```C#
timePicker.SelectedTime = new TimeSpan(15, 0, 0);
```

```VB.NET
	timePicker.SelectedTime = New TimeSpan(15,0,0)
```

> In order to take some action when the SelectedTime is changed, you can handle the **SelectionChanged** event. You can check out all of the available events in the [Events](https://www.telerik.com/products/wpf/documentation/controls/raddatetimepicker/events) article of the RadDateTimePicker.

## StartTime, EndTime and TimeInterval

You can limit the times that can be selected by setting the **StartTime** and **EndTime** properties. The **TimeInterval** property allows user to specify the interval between time slots available for selection. For more information, check out the [Clock Items](https://www.telerik.com/products/wpf/documentation/controls/raddatetimepicker/features/clock-items#using-the-starttime-endtime-and-timeinterval-features).

**Example 2: Setting the StartTime, EndTime and TimeInterval**

```XAML
<telerik:RadTimePicker x:Name="timePicker" TimeInterval="0:30:0" StartTime="0:0:0" EndTime="7:0:0" />
```

## Setting the ClockItemsSource

You can also populate the RadTimePicker from code behind by setting its ClockItemsSource property to a collection of TimeSpan objects. **Example 3** demonstrates how you can achieve this.

**Example 3: Setting the ClockItemsSource**

```C#
public DataBinding()
{
    this.radTimePicker.ClockItemsSource = this.LoadDataObjects();
}
public ObservableCollection<TimeSpan> LoadDataObjects()
{
    ObservableCollection<TimeSpan> times = new ObservableCollection<TimeSpan>()
{
   new TimeSpan(9,0,0),
   new TimeSpan(10,0,0),
   new TimeSpan(10,5,0),
   new TimeSpan(10,22,0),
};
    return times;
}
```

```VB.NET
	Public Sub New()
		Me.radTimePicker.ClockItemsSource = Me.LoadDataObjects()
	End Sub
	Public Function LoadDataObjects() As ObservableCollection(Of TimeSpan)
		Dim times As New ObservableCollection(Of TimeSpan)() From {
			New TimeSpan(9,0,0),
			New TimeSpan(10,0,0),
			New TimeSpan(10,5,0),
			New TimeSpan(10,22,0)
		}
		Return times
	End Function
```

## Telerik UI for WPF Learning Resources

* [Telerik UI for WPF TimePicker Component](https://www.telerik.com/products/wpf/datetimepicker.aspx)
* [Getting Started with Telerik UI for WPF Components](https://www.telerik.com/products/wpf/documentation/getting-started/first-steps-nuget)
* [Telerik UI for WPF Installation](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/installation-guide)
* [Telerik UI for WPF and WinForms Integration](https://www.telerik.com/products/wpf/documentation/common-information/winforms-integration/overview)
* [Telerik UI for WPF Visual Studio Templates](https://www.telerik.com/products/wpf/documentation/installation/manual-setup-guides/visual-studio-templates)
* [Setting a Theme with Telerik UI for WPF](https://www.telerik.com/products/wpf/documentation/styling-and-appearance/styling-apperance-setting-a-theme-overview)
* [Telerik UI for WPF Virtual Classroom (Training Courses for Registered Users)](https://learn.telerik.com/learn/course/external/view/elearning/16/telerik-ui-for-wpf)
* [Telerik UI for WPF License Agreement](https://www.telerik.com/purchase/license-agreement/wpf-dlw-s)

## See also

* [Layout Support](https://www.telerik.com/products/wpf/documentation/controls/radtimepicker/styles-and-templates/layout-support)
* [Keyboard Support](https://www.telerik.com/products/wpf/documentation/controls/raddatetimepicker/features/keyboard-support)
* [Parsing Without Separators](https://www.telerik.com/products/wpf/documentation/controls/raddatetimepicker/features/parsing-without-separators#parsing-the-time-part)
