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);
CodePudding user response:
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.
CodePudding user response:
You can check if the language supports English.
You can use Custom Renderer to override it.
This link introduces the method of rewriting. You can refer to the specific method inside.