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

1
  • What locale is in use on the iOS device Commented Mar 9, 2022 at 9:43

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

Comments

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.