# .NET MAUI Chat DatePicker

The `RadChatPicker` control provides a `DatePickerContext` that you can use to display a calendar and allow the user to choose a date.

`DatePickerContext` exposes the following properties that allow you to show a list of possible options to the user:

* `SelectedDate`—Defines the currently selected date;
* `MinDate`—Defines the min date that can be displayed and selected;
* `MaxDate`—Defines the max date that can be displayed and selected;

Here is a quick example on how to use DatePicker:

```C#
DatePickerContext context = new DatePickerContext
{
    MinDate = new DateTime(2019, 1, 1),
    MaxDate = new DateTime(2019, 2, 2),
    SelectedDate = new DateTime(2019, 1, 16)
};
PickerItem pickerItem = new PickerItem { Context = context };
chat.Items.Add(new TextMessage { Text = "Select a date", Author = chat.Author });
chat.Items.Add(pickerItem);

context.PropertyChanged += (s, e) =>
{
    if (e.PropertyName == "SelectedDate")
    {
        if (context.SelectedDate != null)
        {
            chat.Items.Remove(pickerItem);
            chat.Items.Add(new TextMessage { Author = chat.Author, Text = "" + context.SelectedDate });
        }
    }
};
```

> caption Chat with DatePicker

![Telerik UI for .NET MAUI Chat DatePicker message showing a February 2019 calendar and Select a date button](https://www.telerik.com/maui-ui/documentation/assets/da1d3da66defbe689800eba942a494b2/chat-date-picker.png)

## See Also

* [ChatPicker](https://www.telerik.com/maui-ui/documentation/controls/chat/pickers/overview)
* [TimePicker](https://www.telerik.com/maui-ui/documentation/controls/chat/pickers/timepicker)
* [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)
