# .NET MAUI Chat TimePicker

The `RadChatPicker` control provides a `TimePickerContext` that can be used to display a clock view to choose a time.

`TimePickerContext` exposes the following properties that you can use to adjust the clock items:

* `SelectedValue`—Defines the currently selected time.
* `StartTime`—A property of type `TimeSpan` that represents the starting time of the clock's items.
* `EndTime`—A property of type `TimeSpan` that corresponds to the time of the last clock item.
* `TimeInterval`—A property of type `TimeSpan` that defines the step between the clock's items. The default value is 1 hour.

Here is a quick example on how to use the TimePicker in `RadChat`:

```C#
TimePickerContext context = new TimePickerContext
{
    StartTime = TimeSpan.FromHours(1),
    EndTime = TimeSpan.FromHours(5),
};
PickerItem pickerItem = new PickerItem { Context = context };
chat.Items.Add(new TextMessage { Text = "Select a time" });
chat.Items.Add(pickerItem);
context.PropertyChanged += (s, e) =>
{
    if (e.PropertyName == "SelectedValue")
    {
        if (context.SelectedValue != null)
        {
            chat.Items.Remove(pickerItem);
            chat.Items.Add(new TextMessage { Author = chat.Author, Text = "" + context.SelectedValue });
        }
    }
};
```

> caption Chat with TimePicker

![Telerik UI for .NET MAUI Chat TimePicker message listing hourly options from 01:00 through 05:00](https://www.telerik.com/maui-ui/documentation/assets/edd21a9eb395ba3fd62518b2f018ecab/chat-time-picker.png)

## See Also

* [ChatPicker](https://www.telerik.com/maui-ui/documentation/controls/chat/pickers/overview)
* [ItemPicker](https://www.telerik.com/maui-ui/documentation/controls/chat/pickers/itempicker)
* [CardPicker](https://www.telerik.com/maui-ui/documentation/controls/chat/pickers/card-picker/overview)
