Spinner Format

Date Picker for Xamarin allows you to use standard or custom date 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 Date Format Strings

The available Standard Date Format Strings which can be set to the SpinnerFormat property are described in the table below:

Supported Standard Date Format String Description
"d" Short Date Format. Invariant culture format is MM/dd/yyyy
"G" Short Date "d" and Long Time "T"
"g" Short Date "d" and Short Time "t"
"M" Month Format Specifier
"m" Month Format specifier
"Y" Year Month Format Specifier
"y" Year Month Format Specifier

Custom Date Format Strings

The available Custom Date Format Strings which can be set to the SpinnerFormat property are described in the table below:

Supported Custom Date Format Strings
"d"
"dd"
"M"
"MM"
"MMM"
"MMMM"
"y"
"yyy"
"yyyy"

We currently do not support any standard date formats which contain long date inside them. Standard Date Format Strings to the Date Picker control.

Supported Separators

When SpinnerFormat is set and the device culture is changed, the separators used for the format string won't be changed:

Supported Format Separators
"-"
"."
","
" "
":"
"/"

Examples

SpinnerFormat="MMMM dd"

<telerikInput:RadDatePicker SpinnerFormat="MMMM dd" />

And the result:

SpinnerFormat="dd"

<telerikInput:RadDatePicker SpinnerFormat="dd" />

And the result:

SpinnerFormat="MMM yyyy"

<telerikInput:RadDatePicker SpinnerFormat="MMM yyyy" />

And the result:

SpinnerFormat="yyyy/dd/MMM"

<telerikInput:RadDatePicker SpinnerFormat="yyyy/dd/MMM" />

And the result:

See Also

In this article
Not finding the help you need? Improve this article