Forum Xamarin.Android

DatePicker doesn't work well on real device

I use DatePicker in Xamarin.Forms.

On UWP and virtual Android device, it works well.
This is a screenshot of virtual device.

But on real android device, it doesn't work on.

Why does this problem occur?
Version of my real device is Android11, so I changed target version and default language. However, the problem doesn't solve.
~Add~
On Android11 virtual device, The function works well.
And then, A switch button doesn't display well too.

This is my code
`MainPage.cs

public partial class MainPage : ContentPage {
    public MainPage() {
        InitializeComponent();
    }
    public async void newpage(object sender, EventArgs e) {
        await Navigation.PushAsync(new addPage());
    }
 }`

`addPage.xaml(excerpt)

<StackLayout BackgroundColor="White"
                         Orientation="Horizontal"
                         Padding="7,5,5,5"
                          >
                <Label Text="           開始日時"
                       FontSize="17"
                       TextColor="Black"
                       HorizontalOptions="Start"
                       VerticalOptions="Center"/>
                <DatePicker x:Name="startTimePicker"
                            Format="yyyy/MM/dd"
                            Date="2021/01/30"
                            HorizontalOptions="End" />
            </StackLayout>`
Sign In or Register to comment.