Xamarin Forms timepicker 24hour

user3718160 picture user3718160 · May 12, 2015 · Viewed 9.3k times · Source

I'm new to Xamarin.Forms and i can't seems to find how to show the dialog in a 24hour format instead of a AM/PM

can someone help me ?

Thank you

Answer

Mario Galván picture Mario Galván · May 12, 2015

This page is really usefull to learn how to format dates in C#:

https://msdn.microsoft.com/en-us/library/8kb3ddd4%28v=vs.110%29.aspx

And with this code I was able to show a 24 hour format:

TimePicker timePicker = new TimePicker
{
   Format = "HH:mm"
};