Skip to content

DatePicker default format on iOS #27803

@eqmarcin

Description

@eqmarcin

Description

Hi,

Since .NET upgrade I have issue with default date format on iOS picker.

If I'll set date as below:
[ObservableProperty] DateTime _workDate = DateTime.Now;

it will display it as mm/dd/yyyy (US format) even if device localization or keyboard is not in US and should display as dd/mm/yyyy:
Image

If I change date on the picker and return to today it will be OK (dd/mm/yyyy):
Image

Also if I set date somewhere in the code later it will also display proper format
WorkDate = DateTime.Now;

XAML code:
<DatePicker Grid.Column="1" Date="{Binding WorkDate, Mode=TwoWay}" FontSize="Small" HorizontalOptions="Start" MaximumDate="12/31/2029" MinimumDate="01/01/2022" VerticalOptions="Start" />

The same code was working in .NET 8

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

9.0.22 SR2.2

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.80 SR8

Affected platforms

iOS

Affected platform versions

iOS

Did you find any workaround?

Set date somewhere in the code

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions