ClassRadDateTimePicker
Represents the DateTimePicker control wrapper.
Definition
Namespace:Telerik.WebAii.Controls.Xaml
Assembly:Telerik.WebAii.Controls.Xaml.dll
Syntax:
public class RadDateTimePicker : Control, IAutomationPeer, IPeerConverter, IRadDateTimePicker, IControl, IFrameworkElement, ITargetElement
Inheritance: objectAutomationObject<FrameworkElement>FrameworkElementSilverlightTestElementControlRadDateTimePicker
Derived Classes:
Implements:
Inherited Members
Constructors
RadDateTimePicker()
Initializes a new instance of the RadDateTimePicker class.
Declaration
public RadDateTimePicker()
Properties
Calendar
Gets the calendar from the popup if open; returns 'null' otherwise.
Clock
Gets the clock control from the popup if open; returns 'null' otherwise.
Declaration
public DateTimePickerClock Clock { get; }
Property Value
Culture
Gets the Culture representation of the dateTimePicker.
IsDropDownOpen
Get whether the datetimepicker popup is opened. Returns 'false' also if the popup cannot be found with the current control template.
IsReadOnly
Gets whether the DateTimePicker is read only.
IsTooltipEnabled
Gets whether the DateTimePicker has it's tooltip enabled.
SelectedValue
Gets the DateTimePicker selected date via an automation property.
Declaration
public DateTime? SelectedValue { get; }
Property Value
Implements
Text
Get the text of the DateTimePicker input text box.
Declaration
public override string Text { get; }
Property Value
Overrides
Implements
TextBox
Get the DateTimePicker input text box.
Declaration
[Obsolete("The property is deprecated. Please use .TextBoxElement instead.")]
public RadWatermarkTextBox TextBox { get; }
Property Value
TextBoxElement
Get the DateTimePicker input text box.
Declaration
public FrameworkElement TextBoxElement { get; }
Property Value
Implements
TodayButton
Get the Today button.
Declaration
public IRadButton TodayButton { get; }
Property Value
Implements
Methods
MouseClick(MouseClickType)
Triggers mouse click on the text box from the given type.
Declaration
public void MouseClick(MouseClickType clickType)
Parameters
clickType
The type of the mouse click.
MouseClick(MouseClickType, int)
Triggers mouse click from the given type on a text box position calculated with the given offset from the top left of the text box.
Declaration
public void MouseClick(MouseClickType clickType, int offset)
Parameters
clickType
The mouse click type.
offset
The offset from the top left of the text box to click on.
MouseClick(MouseClickType, int, bool)
Triggers mouse click from the given type on a text box position calculated with the given offset from the top left or right of the text box.
Declaration
public void MouseClick(MouseClickType clickType, int offset, bool offsetFromLeft)
Parameters
clickType
The mouse click type.
offset
The offset to calculate the click point from.
offsetFromLeft
Whether to add the offset from the bottom left or bottom right of the text box.
SelectDate(string)
Simulates user clicking on the calendar button to select the date.
Declaration
public void SelectDate(string buttonText)
Parameters
buttonText
The text of the button to be clicked.
Exceptions
Thrown when the DateTimePicker popup is not open.
Thrown when the calendar has no buttons with the given text.
SelectTime(string)
Simulates user clicking on the clock button to select time.
Declaration
public void SelectTime(string buttonText)
Parameters
buttonText
The text of the button to be clicked.
Exceptions
Thrown when the clock contains no button with the given text.
Thrown when the DateTimePicker popup is not open.
TogglePopup()
Simulates user clicking on the calendar image to open/close the popup.
Declaration
public void TogglePopup()
Implements
TypeText(string)
Simulates user entering text into the DateTimePicker text box.
Declaration
public void TypeText(string text)
Parameters
text
The text to enter.
WaitPopupToClose(int)
Useful upon any action over the popup that closes it.
Declaration
public void WaitPopupToClose(int checkDuration)
Parameters
checkDuration
The duration in millis to wait for.