RadDateTimePicker
Represents a control that allows the user to select dates and times.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.Input.dll
Syntax:
[TelerikToolboxCategory("Input")]
public class RadDateTimePicker : Control
Inheritance: objectRadDateTimePicker
Derived Classes:
Constructors
Initializes a new instance of the RadDateTimePicker class.
public RadDateTimePicker()
Fields
AllowParsingWithoutSeparatorProperty
DependencyProperty
Identifies the the AllowParsingWithoutSeparator dependency property.
public static readonly DependencyProperty AllowParsingWithoutSeparatorProperty
BlackoutDatesProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.BlackoutDates dependency property.
public static readonly DependencyProperty BlackoutDatesProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.BlackoutDates dependency property.
CalendarStyleProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.CalendarStyle dependency property.
public static readonly DependencyProperty CalendarStyleProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.CalendarStyle dependency dependency property.
ClockItemsSourceProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.ClockItemsSource dependency property.
public static readonly DependencyProperty ClockItemsSourceProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.ClockItemsSource dependency dependency property.
ClockStyleProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.ClockStyle dependency property.
public static readonly DependencyProperty ClockStyleProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.ClockStyle dependency dependency property.
CultureProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.Culture dependency property.
public static readonly DependencyProperty CultureProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.Culture dependency dependency property.
CurrentDateTimeTextProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.CurrentDateTimeText dependency property.
public static readonly DependencyProperty CurrentDateTimeTextProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.CurrentDateTimeText dependency dependency property.
DateSelectionModeProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.DateSelectionMode dependency property.
public static readonly DependencyProperty DateSelectionModeProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.DateSelectionMode dependency dependency property.
DateTimeSelectedWithMouseEvent
RoutedEvent
Identifies the Telerik.Windows.Controls.RadDateTimePicker.DateTimeSelectedWithMouse routed event.
public static readonly RoutedEvent DateTimeSelectedWithMouseEvent
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.DateTimeSelectedWithMouse routed event.
DateTimeTextProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.DateTimeText dependency property.
public static readonly DependencyProperty DateTimeTextProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.DateTimeText dependency dependency property.
DateTimeWatermarkContentProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.DateTimeWatermarkContent dependency property.
public static readonly DependencyProperty DateTimeWatermarkContentProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.DateTimeWatermarkContent dependency dependency property.
DateTimeWatermarkTemplateProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.DateTimeWatermarkTemplate dependency property.
public static readonly DependencyProperty DateTimeWatermarkTemplateProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.DateTimeWatermarkTemplate dependency dependency property.
DisplayDateEndProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.DisplayDateEnd dependency property.
public static readonly DependencyProperty DisplayDateEndProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.DisplayDateEnd dependency dependency property.
DisplayDateProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.ControlsRadDateTimePicker..DisplayDate dependency property.
public static readonly DependencyProperty DisplayDateProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.DisplayDate dependency dependency property.
DisplayDateStartProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.DisplayDateStart dependency property.
public static readonly DependencyProperty DisplayDateStartProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.DisplayDateStart dependency dependency property.
DisplayFormatProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.DisplayFormat dependency property.
public static readonly DependencyProperty DisplayFormatProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.DisplayFormat dependency dependency property.
EndTimeProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.EndTimeProperty dependency property.
public static readonly DependencyProperty EndTimeProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.EndTimeProperty dependency dependency property.
ErrorTooltipContentProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.ErrorTooltipContent dependency property.
public static readonly DependencyProperty ErrorTooltipContentProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.ErrorTooltipContent dependency dependency property.
InputModeProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.InputMode dependency property.
public static readonly DependencyProperty InputModeProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.InputMode dependency dependency property.
IsDropDownOpenProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.IsDropDownOpen dependency property.
public static readonly DependencyProperty IsDropDownOpenProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.IsDropDownOpen dependency dependency property.
IsInputRestrictedToSelectableDatesProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.IsInputRestrictedToSelectableDates dependency property.
public static readonly DependencyProperty IsInputRestrictedToSelectableDatesProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.IsInputRestrictedToSelectableDates dependency dependency property.
IsReadOnlyProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.IsReadOnly dependency property.
public static readonly DependencyProperty IsReadOnlyProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.IsReadOnly dependency dependency property.
IsTooltipEnabledProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.IsTooltipEnabled dependency property.
public static readonly DependencyProperty IsTooltipEnabledProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.IsTooltipEnabled dependency dependency property.
IsTooltipOpenProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.IsTooltipOpen dependency property.
public static readonly DependencyProperty IsTooltipOpenProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.IsTooltipOpen dependency dependency property.
OpenDropDownOnFocusProperty
DependencyProperty
Identifies the OpenDropDownOnFocus dependency property.
public static readonly DependencyProperty OpenDropDownOnFocusProperty
ParseDateTimeValueEvent
RoutedEvent
Identifies the Telerik.Windows.Controls.RadDateTimePicker.ParseDateTimeValue routed event.
public static readonly RoutedEvent ParseDateTimeValueEvent
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.ParseDateTimeValue routed event.
ParseExactProperty
DependencyProperty
Identifies the the ParseExact dependency property.
public static readonly DependencyProperty ParseExactProperty
ParseModeProperty
DependencyProperty
Identifies the the Telerik.Windows.Controls.RadDateTimePicker.ParseMode dependency property.
public static readonly DependencyProperty ParseModeProperty
SelectableDateEndProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.SelectableDateEnd dependency property.
public static readonly DependencyProperty SelectableDateEndProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.SelectableDateEnd dependency dependency property.
SelectableDateStartProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.SelectableDateStart dependency property.
public static readonly DependencyProperty SelectableDateStartProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.SelectableDateStart dependency dependency property.
SelectedDateProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.SelectedDate dependency property.
public static readonly DependencyProperty SelectedDateProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.SelectedDate dependency dependency property.
SelectedTimeProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.SelectedTime dependency property.
public static readonly DependencyProperty SelectedTimeProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.SelectedTime dependency dependency property.
SelectedValueProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.SelectedValue dependency property.
public static readonly DependencyProperty SelectedValueProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.SelectedValue dependency dependency property.
SelectionChangedEvent
RoutedEvent
Identifies the Telerik.Windows.Controls.RadDateTimePicker.SelectionChanged routed event.
public static readonly RoutedEvent SelectionChangedEvent
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.SelectionChanged routed event.
SelectionOnFocusProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.SelectionOnFocus dependency property.
public static readonly DependencyProperty SelectionOnFocusProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.SelectionOnFocus dependency dependency property.
StartTimeProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.StartTimeProperty dependency property.
public static readonly DependencyProperty StartTimeProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.StartTimeProperty dependency dependency property.
TextAlignmentProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.TextAlignment dependency property.
public static readonly DependencyProperty TextAlignmentProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.TextAlignment dependency dependency property.
TimeIntervalProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.TimeIntervalProperty dependency property.
public static readonly DependencyProperty TimeIntervalProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.TimeIntervalProperty dependency dependency property.
TodayButtonContentProperty
DependencyProperty
Gets the identifier for the TodayButtonContent dependency property.
public static readonly DependencyProperty TodayButtonContentProperty
The identifier for the TodayButtonContent dependency dependency property.
TodayButtonVisibilityProperty
DependencyProperty
Gets the identifier for the TodayButtonVisibility dependency property.
public static readonly DependencyProperty TodayButtonVisibilityProperty
The identifier for the TodayButtonVisibility dependency dependency property.
TooltipContentProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.TooltipContent dependency property.
public static readonly DependencyProperty TooltipContentProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.TooltipContent dependency dependency property.
TooltipTemplateProperty
DependencyProperty
Gets the identifier for the Telerik.Windows.Controls.RadDateTimePicker.TooltipTemplate dependency property.
public static readonly DependencyProperty TooltipTemplateProperty
The identifier for the Telerik.Windows.Controls.RadDateTimePicker.TooltipTemplate dependency dependency property.
Properties
Gets or sets the AllowParsingWithoutSeparator property.
public bool AllowParsingWithoutSeparator { get; set; }
Gets or sets a list of dates that cannot be selected. This is a dependency property.
public IEnumerable<DateTime> BlackoutDates { get; set; }
Please refer to BlackoutDates for more information on the property.
CalendarStyle
Style
Gets or sets the style of the Calendar for picking date. This is a dependency property.
public Style CalendarStyle { get; set; }
The Style of the Calendar.
Gets or sets a collection of TimeSpan used to generate the content of the Clock. This is a dependency property.
public IEnumerable<TimeSpan> ClockItemsSource { get; set; }
ClockStyle
Style
Gets or sets the style of the Clock for picking time. This is a dependency property.
public Style ClockStyle { get; set; }
The Style of the Clock.
Gets the culture used to provide the DateTime operations. This is a dependency property.
public CultureInfo Culture { get; set; }
Gets or sets the current text in the RadDateTimePicker control. This is a dependency property.
public string CurrentDateTimeText { get; set; }
The CurrentDateTimeText property changes while user is typing a text in the textbox. There is a difference between DateTimeText and CurrentDateTimeText. DateTimeText property changes when user had already entered a text. For example, this happens when the textbox has lost the focus. CurrentDateTimeText property changes every time when user is typing in the textbox.
Gets or sets DateSelectionMode that specifies whether the calendar in RadDateTimePicker will select Days, Months or Years. This is a dependency property.
public DateSelectionMode DateSelectionMode { get; set; }
The DateSelectionMode of the calendar.
Gets or sets the text in the RadDateTimePicker control. This is a dependency property.
public string DateTimeText { get; set; }
The DateTimeText property changes while user has typed a text in the textbox. There is a difference between DateTimeText and CurrentDateTimeText. DateTimeText property changes when user had already entered a text. For example, this happens when the textbox has lost the focus. CurrentDateTimeText property changes every time when user is typing in the textbox.
Gets or sets the content of the RadDateTimePicker control when there is no entered text. This is a dependency property.
public object DateTimeWatermarkContent { get; set; }
DateTimeWatermarkTemplate
DataTemplate
Gets or sets the System.Windows.DataTemplate used to display DateTimeWatermark when there is no selection. This is a dependency property.
public DataTemplate DateTimeWatermarkTemplate { get; set; }
Gets or sets the date to display in the RadDateTimePicker. If no display date was set, then the SelectedDate is used. This is a dependency property.
public DateTime DisplayDate { get; set; }
The DisplayDateStart and DisplayDateEnd properties defined a range within which the DisplayDate can be set, i.e. a range within which the user can navigate. If you try to set a DisplayDate outside the defined range an ArgumentOutOfRangeException would be thrown. Similarly, setting a display range that excludes the current DisplayDate would throw an exception.
Please note that unlike the other date properties DisplayDate cannot be set to null.
Gets or sets the last date to be displayed. This is a dependency property.
public DateTime? DisplayDateEnd { get; set; }
Please refer to DisplayDateEnd for more information on the property.
Gets or sets the first date to be displayed. This is a dependency property.
public DateTime? DisplayDateStart { get; set; }
Please refer to DisplayDateStart for more information on the property.
Gets or sets the format that is used to display the selected date. This is a dependency property.
public DateTimePickerFormat DisplayFormat { get; set; }
Gets or sets the end time of Telerik.Windows.Controls.RadDateTimePicker control.
public TimeSpan EndTime { get; set; }
The TimeSpan that represents end time.
The TimeInterval property will be used when generating the Time selection (clock, RadClock, etc.) items. Please note that it will not be used if InputMode is set to DatePicker.
Gets or sets the content of the Tooltip when parsing the input text has failed. This is a dependency property.
public object ErrorTooltipContent { get; set; }
Gets or sets InputMode that specifies whether the RadDateTimePicker will allow Time input, Date input or both. This is a dependency property.
public InputMode InputMode { get; set; }
The InputMode of the RadDateTimePicker.
The default is both - Date and Time input.
Gets or sets a value that indicates whether the DropDown button is open or closed. This is a dependency property.
public bool IsDropDownOpen { get; set; }
True if this DropDown button is open; otherwise, false.
Gets or sets value indicating whether the input should be restricted by the SelectableDateStart, SelectableDateEnd and BlackoutDates. This is a dependency property.
public bool IsInputRestrictedToSelectableDates { get; set; }
Gets or sets a value that indicates whether this instance of RadDateTimePicker is read only. This is a dependency property.
public bool IsReadOnly { get; set; }
True if this instance is read only; otherwise, false.
Gets or sets a value that indicates whether the preview ToolTip is enabled. This is a dependency property.
public bool IsTooltipEnabled { get; set; }
True if this Tooltip is enabled; otherwise, false.
When IsTooltipEnabled is true, ToolTip can be open or closed. When is false - ToolTip is always closed.
Gets or sets a value that indicates whether the Tooltip is open or closed. This is a dependency property.
public bool IsTooltipOpen { get; set; }
True if this Tooltip is open; otherwise, false.
Gets or sets a value that specifies whether the dropdown should be opened when the control gets the focus, or not. This is a dependency property.
public bool OpenDropDownOnFocus { get; set; }
Gets or sets the ParseExact property. When set to the it is used the DateTime.TryParseExact() method for parsing the input.
public bool ParseExact { get; set; }
Gets or sets the parsing mode of Telerik.Windows.Controls.RadDateTimePicker control.
public ParseMode ParseMode { get; set; }
Gets or sets the last date that can be selected. This is a dependency property.
public DateTime? SelectableDateEnd { get; set; }
Please refer to SelectableDateEnd for more information on the property.
Gets or sets the first date that can be selected. This is a dependency property.
public DateTime? SelectableDateStart { get; set; }
Please refer to SelectableDateStart for more information on the property.
Gets or sets the Date part of the currently selected DateTime value. This is a dependency property.
public DateTime? SelectedDate { get; set; }
Gets or sets the Time part of the currently selected DateTime value This is a dependency property.
public TimeSpan? SelectedTime { get; set; }
Gets or sets the currently selected DateTime value. This is a dependency property.
public DateTime? SelectedValue { get; set; }
Gets or sets the SelectionOnFocus of the TextBox inside the RadDateTimePicker. This is a dependency property.
public SelectionOnFocus SelectionOnFocus { get; set; }
The SelectionOnFocus of the TextBox.
Gets or sets the start time of Telerik.Windows.Controls.RadDateTimePicker control.
public TimeSpan StartTime { get; set; }
The TimeSpan that represents start time.
The TimeInterval property will be used when generating the Time selection (clock, RadClock, etc.) items. Please note that it will not be used if InputMode is set to DatePicker.
TextAlignment
TextAlignment
Gets or sets the TextAlignment of the TextBox inside the RadDateTimePicker. This is a dependency property.
public TextAlignment TextAlignment { get; set; }
The TextAlignment of the TextBox.
Gets or sets the time interval that will be used when generating the Time selection (clock, RadClock, etc.) items.
public TimeSpan TimeInterval { get; set; }
The TimeSpan that represents the time interval.
Please note that it will not be used if InputMode is set to DatePicker.
Gets or sets the content of the button that selects the current DateTime. This is a dependency property.
public object TodayButtonContent { get; set; }
TodayButtonVisibility
Visibility
Gets or sets the Visibility of RadDateTimePicker control's Today button.
public Visibility TodayButtonVisibility { get; set; }
Gets or sets the content of the Tooltip. RadDateTimePicker sets this property automatically when the user types in its TextBox. This is a dependency property.
public object TooltipContent { get; set; }
TooltipTemplate
DataTemplate
Gets or sets a data template to be used for displaying the TooltipContent. This is a dependency property.
public DataTemplate TooltipTemplate { get; set; }
Methods
When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call System.Windows.Controls.Control.ApplyTemplate(). In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.
public override void OnApplyTemplate()
OnCreateAutomationPeer()
AutomationPeer
Create the DateTimePicker Automation Peer.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
Called before the event occurs.
protected override void OnGotFocus(RoutedEventArgs e)
The data for the event.
Raises the event.
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
The KeyboardFocusChangedEventArgs instance containing the event data.
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Called when the property has changed.
protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
The event data.
Called before the event occurs.
protected override void OnKeyDown(KeyEventArgs e)
The data for the event.
Called before the event occurs.
protected override void OnLostFocus(RoutedEventArgs e)
The data for the event.
Called before the event occurs.
protected override void OnMouseEnter(MouseEventArgs e)
The data for the event.
Called before the event occurs.
protected override void OnMouseLeave(MouseEventArgs e)
The data for the event.
protected override void OnMouseWheel(MouseWheelEventArgs e)
Raises the ParseDateTimeValue routed event.
protected virtual void OnParseDateTime(ParseDateTimeEventArgs e)
The data for the routed event.
Called when the SelectionChanged event occurs.
protected virtual void OnSelectionChanged(SelectionChangedEventArgs e)
The data for the event.
Process with the selected key.
protected virtual void ProcessKey(KeyEventArgs e)
The data for the event.
Called to update the DateTimeText property of RadDateTimePicker.
public void UpdateText()
Events
DropDownClosed
RoutedEventHandler
Occurs when the DropDownButton is closed.
public event RoutedEventHandler DropDownClosed
DropDownOpened
RoutedEventHandler
Occurs when the DropDownButton is opened.
public event RoutedEventHandler DropDownOpened
Occurs when the input text is parsed to DateTime value. This happens when DateTimeText property has changed.
public event RadDateTimePicker.ParseDateTimeEventHandler ParseDateTimeValue
The ParseDateTimeValue event is fired when the DateTimeText property has changed. For example this happens when the user enters text and leave the control.
SelectionChanged
SelectionChangedEventHandler
Occurs when a date or time is selected.
public event SelectionChangedEventHandler SelectionChanged
The SelectionChanged event is fired when the SelectedValue has changed.