0

I have a time picker basically the user can select time with it. It's perfectly displaying in Android. But, am/pm is displaying in different language in iOS. Any idea why it is happening ?

Code

                               <TimePicker x:Name="time"
                                BackgroundColor="Transparent"
                                Format="hh:mm tt"
                                TextColor="{StaticResource TitleColor}"
                                Focused="time_Focused"
                                HorizontalOptions="CenterAndExpand"/>


time.Time = new TimeSpan(07, 30, 00);

View

Felix Christo
  • 301
  • 1
  • 3
  • 19

2 Answers2

1

I know in just regular c# I would do something like this: date1.ToString("hh:mm tt", CultureInfo.InvariantCulture) but I don't know how to add culture information in xaml code.

1
  1. You can check if the language supports English.

  2. You can use Custom Renderer to override it.

    This link introduces the method of rewriting. You can refer to the specific method inside.

Wen xu Li
  • 1,698
  • 1
  • 4
  • 7