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

MaskedDateTimeInput

The RadMaskedDateTimeInput represents the basic control that can be used to restrict the input of DateTime values.

Example 1: Adding a RadMaskedDateTimeInput in XAML

<input:RadMaskedDateTimeInput Mask="u" /> 

Properties

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

  • MinValue: Determines the minimum DateTime a user can set with the control.
  • MaxValue: Determines the maximum DateTime a user can set with the control.
  • FallbackValue: Determines the DateTime which will be set when the value is cleared.
  • 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.
  • AutoCompleteYear: Indicates whether the year part is auto-completed.
  • YearResetValue: Indicates the reset value of the year section (value when you delete the section).
  • MillisecondsStep: Determines the spin step in milliseconds section.
  • SecondsStep: Determines the spin step in seconds section.
  • MinutesStep: Determines the spin step in minutes section.
  • HoursStep: Determines the spin step in hours section.

Standard Date Format codes

Full list of the supported masks can be found in the following MSDN article: Standard DateTime masks

Format Character Description
d Short date pattern
D Long date pattern
f Full date and time (long date and short time)
F Full date time pattern (long date and long time)
g General (short date and short time)
G General (short date and long time)
m, M Month day pattern
r, R RFC1123 pattern
s Sortable date time pattern (based on ISO 8601) using local time
t Short time pattern
T Long time pattern

Custom Date Format Codes

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

Full list of the supported masks can be found in the following MSDN article: Custom DateTime masks

Format Pattern Description
dd The numeric day of the month.
ddd The abbreviated name of the day of the week.
M The month name followed by the numeric day.
MM The numeric month.
MMM The abbreviated name of the month.
MMMM The full name of the month.
y The full month name and year numeric.
yy The year without the century.
yyy The year in four digits, including the century.
h The hour in a 12-hour clock.
hh The hour in a 12-hour clock.
H The hour in a 24-hour clock.
HH The hour in a 24-hour clock.
m The minute.
mm The minute.
s The second.
ss The second.
t The first character in the AM/PM designator.
tt The AM/PM designator.

See Also

In this article
Not finding the help you need?