New to Telerik UI for WinUIStart a free 30-day trial

MaskedTimeSpanInput

Updated on Mar 26, 2026

The RadMaskedTimeSpanInput represents the basic control that can be used to restrict the input of TimeSpan values.

Example 1: Adding a RadMaskedTimeSpanInput in XAML

XAML
<input:RadMaskedTimeSpanInput Mask="hh:mm:ss" />

Properties

The control exposes the following properties which you can use to control the user input:

  • MinValue: Allows you to define the minimum value that can be entered.
  • MaxValue: Allows you to define the maximum value that can be entered.
  • AutoSelectNextPart: Indicates whether the next part is selected when the current one is filled.
  • EnableKeyNavigation: Indicates whether the sections can be navigated with the arrow keys.
  • MillisecondsStep: Determines the spin step in the milliseconds section.
  • SecondsStep: Determines the spin step in the seconds section.
  • MinutesStep: Determines the spin step in the minutes section.
  • HoursStep: Determines the spin step in the hours section.
  • DaysStep: Determines the spin step in the days section.

Standard TimeSpan Format codes

A full list of the supported masks can be found in the following MSDN article: Standard TimeSpan masks

Format CharacterDescription
cConstant (invariant) format
gGeneral short format
GGeneral long format

Custom TimeSpan Format codes

Where standard TimeSpan codes are too restrictive, create your own custom formats using the format patterns listed below.

A full list of the supported masks can be found in the following MSDN article: Custom TimeSpan masks

Format PatternDescription
dThe number of whole days in the time interval.
ddThe number of whole days in the time interval, padded with leading zeros as needed.
hThe number of whole hours in the time interval that aren't counted as part of days. Single-digit hours don't have a leading zero.
hhThe number of whole hours in the time interval that aren't counted as part of days. Single-digit hours have a leading zero.
mThe number of whole minutes in the time interval that aren't included as part of hours or days. Single-digit minutes don't have a leading zero.
mmThe number of whole minutes in the time interval that aren't included as part of hours or days. Single-digit minutes have a leading zero.
sThe number of whole seconds in the time interval that aren't included as part of hours, days, or minutes. Single-digit seconds don't have a leading zero.
ssThe number of whole seconds in the time interval that aren't included as part of hours, days, or minutes. Single-digit seconds have a leading zero.
fThe tenths of a second in a time interval.
ffThe hundredths of a second in a time interval.
fffThe milliseconds in a time interval.
FThe tenths of a second in a time interval. Nothing is displayed if the digit is zero.
FFThe hundredths of a second in a time interval. Any fractional trailing zeros or two zero digits aren't included.
FFFThe milliseconds in a time interval. Any fractional trailing zeros aren't included.

See Also