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

Key Features

The purpose of this help article is to show you the key features of the Time Picker control for Xamarin.

Time Range

Time Picker allows you to define a time range and choose a time in between through the following properties:

  • MinimumTime(TimeSpan): Defines a time which marks the beginning of the range of the available time values. The default value is TimeSpan.Zero.

  • MaximumTime(TimeSpan): Defines a time which marks the end of the range of the available time values to choose from. The default value is TimeSpan(23, 59, 59).

Example

<telerikInput:RadTimePicker MinimumTime="8:00:00"
                            MaximumTime="19:00:00"/>

Current Selected Time

  • Time(TimeSpan?): Defines the current time selection. The default value is null.

Example

<telerikInput:RadTimePicker Time="10:30:00"/>

Incremental Time Steps

By default the TimePicker increments each part of its time values by one step. You can change the default setup using the following properties:

  • HourStep(int): Controls the incremental step of the hour value. Default value is 1.
  • MinuteStep(int): Controls the incremental step of the minute value. Default value is 1.
  • SecondStep(int): Controls the incremental step of the second value. Default value is 1.
<telerikInput:RadTimePicker HourStep="2" 
                            MinuteStep="10" 
                            SecondStep="30"/>

DefaultHighlightedTime

RadTime Picker DefaultHighlightedTime(TimeSpan) defines the System.TimeSpan which will be used to pre-scroll each spinner when RadTimePicker.Time property is set to null.

Example

<telerikInput:RadTimePicker DefaultHighlightedTime="11:30:00"
                            SpinnerFormat="t"
                            AreSpinnerHeadersVisible="False"/>

DisplayString Format

  • DisplayStringFormat(string): Defines the format of the string that will be visualized when the picker dialog is closed.

The format set for DisplayStringFormat should be a valid time format.

Example

Here is a sample Time Picker definition:

<telerikInput:RadTimePicker DefaultHighlightedTime="11:30:00"
                            SpinnerFormat="t"
                            AreSpinnerHeadersVisible="False"/>

IsLooping property

The TimePicker exposes IsLooping boolean property which indicates whether the items in the popup should loop infinitely while scrolling. By default looping is enabled, to disable it, just set IsLooping to False.

<telerikInput:RadTimePicker IsLooping="False" />

Check the difference in the behavior according to IsLooping below:

IsLooping set to True (default)

IsLooping set to False

A sample Key Features example can be found in the TimePicker/Features folder of the SDK Samples Browser application.

See Also

In this article