I would love to have an option to display a calendar in the DatePicker date selection popup
Best regards,
Marcel Souza
Pds Informática
Hi Marcel,
The .NET MAUI DatePicker control can show the date components only in spinners, it does not provide month-like view. We have a feature request logged here for such a functionality (that's why I marked this feature request as "Duplicated"), you can check it at the link below:
DateTimePicker: Provide an option to display calendar inside the dropdown
In the meantime, you can use our RadTemplatePicker in combination with RadCalendar to achieve similar look & feel, here is a quick sample:
<telerik:RadTemplatedPicker x:Name="picker"
Placeholder="Select a Date"
PickerMode="Popup">
<telerik:RadTemplatedPicker.SelectorTemplate>
<ControlTemplate>
<telerik:RadCalendar x:Name="calendar" SelectedDate="{TemplateBinding SelectedValue, Mode=TwoWay, Converter={StaticResource StringToDateTimeConverter}}" />
</ControlTemplate>
</telerik:RadTemplatedPicker.SelectorTemplate>
</telerik:RadTemplatedPicker>
And the converter:
public class StringToDateTimeConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return value;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is DateTime selectedDate)
{
return selectedDate.ToString("yyyy/MMM/dd");
}
return null;
}
}
I hope this approach would be acceptable.
Regards,
Yana
Progress Telerik