New to Telerik UI for Xamarin? Download free 30-day trial

Spinner Format

Time Picker for Xamarin allows you to use standard or custom time format strings through the SpinnerFormat property. Depending on what format is set, the picker visualizes spinner controls with prepopulated values to be picked.

  • SpinnerFormat(string): Defines the string format for the spinners. The default format is "g".

Standard Тime Format Strings

The available standard date and time format strings that can be set to the SpinnerFormat property are described in the table below:

Supported Standard Time Format String Description
"G" Short Date and Long Time Format Specifier
"g" Short Date and Short Time Format Specifier
"T" Long Time Format Specifier
"t" Short Time Format Specifier

For more information on different format go to Standard Date and Time Format Strings topic on Microsoft Docs.

Custom Time Format String

The available custom time format strings that can be set to the SpinnerFormat property are described in the table below:

Supported Custom Time Format Strings
"H"
"HH"
"h"
"hh"
"m"
"mm"
"s"
"ss"
"t"
"tt"

For more details on different formats go to Custom Date and Time Format Strings topic on Microsoft Docs.

Supported Separators

When SpinnerFormat is set and device culture is changed, the separators used for the format string won't be changed. Check below a list of the available separators:

Supported Time Separators Formats
"-"
"."
"'"
" "
":"
"/"

Example

SpinnerFormat="H:mm"

<telerikInput:RadTimePicker SpinnerFormat="H:mm" />

And the result:

See Also

In this article