Class
RadDateTimePicker

Represents the DateTimePicker control wrapper.

Definition

Namespace:Telerik.WebAii.Controls.Xaml

Assembly:Telerik.WebAii.Controls.Xaml.dll

Syntax:

cs-api-definition
public class RadDateTimePicker : Control, IAutomationPeer, IPeerConverter, IRadDateTimePicker, IControl, IFrameworkElement, ITargetElement

Inheritance: objectAutomationObject<FrameworkElement>FrameworkElementSilverlightTestElementControlRadDateTimePicker

Derived Classes: RadDatePickerRadTimePicker

Implements: IAutomationPeerIControlIFrameworkElementIPeerConverterIRadDateTimePickerITargetElement

Inherited Members Control.IsTabStopPropertyControl.TabIndexPropertyControl.TabNavigationPropertyControl.PaddingPropertyControl.HorizontalContentAlignmentPropertyControl.VerticalContentAlignmentPropertyControl.BackgroundPropertyControl.BorderBrushPropertyControl.BorderThicknessPropertyControl.FontSizePropertyControl.ForegroundPropertyControl.IsEnabledPropertyControl.FontFamilyPropertyControl.FontStretchPropertyControl.FontStylePropertyControl.FontWeightPropertyControl.GetRealType()Control.IsTabStopControl.TabIndexControl.TabNavigationControl.PaddingControl.HorizontalContentAlignmentControl.VerticalContentAlignmentControl.BackgroundControl.BorderBrushControl.BorderThicknessControl.FontSizeControl.ForegroundControl.IsEnabledControl.FontFamilyControl.FontStretchControl.FontStyleControl.FontWeightSilverlightTestElement.UseLayoutRoundingPropertySilverlightTestElement.UseLayoutRoundingFrameworkElement.ActualWidthPropertyFrameworkElement.ActualHeightPropertyFrameworkElement.WidthPropertyFrameworkElement.HeightPropertyFrameworkElement.MinWidthPropertyFrameworkElement.MaxWidthPropertyFrameworkElement.MinHeightPropertyFrameworkElement.MaxHeightPropertyFrameworkElement.HorizontalAlignmentPropertyFrameworkElement.VerticalAlignmentPropertyFrameworkElement.MarginPropertyFrameworkElement.DesiredSizePropertyFrameworkElement.RenderSizePropertyFrameworkElement.NamePropertyFrameworkElement.TagPropertyFrameworkElement.DataContextPropertyFrameworkElement.OpacityPropertyFrameworkElement.ClipPropertyFrameworkElement.RenderTransformPropertyFrameworkElement.OpacityMaskPropertyFrameworkElement.RenderTransformOriginPropertyFrameworkElement.IsHitTestVisiblePropertyFrameworkElement.VisibilityPropertyFrameworkElement.GetIdentifier(out string, out string)FrameworkElement.IsChild(FrameworkElement)FrameworkElement.GetChildTagIndex(FrameworkElement)FrameworkElement.InitializeMappings(MappingsCollection)FrameworkElement.As<T>()FrameworkElement.CastAs<T>()FrameworkElement.SetProxy(bool)FrameworkElement.SetUid(string)FrameworkElement.SetFindInfo(VisualFindInfo)FrameworkElement.SetXamlTag(string)FrameworkElement.AssignReference(AutomationReference)FrameworkElement.KeyPress(Keys, int, int, int)FrameworkElement.GetRectangle()FrameworkElement.GetRectangle(FrameworkElement)FrameworkElement.GetIntRectangle()FrameworkElement.IsHitTest()FrameworkElement.IsHitTest(bool)FrameworkElement.IsHitTest(FrameworkElement, bool)FrameworkElement.Highlight()FrameworkElement.Highlight(bool)FrameworkElement.Parent()FrameworkElement.Parent<T>()FrameworkElement.Parent(string)FrameworkElement.Parent(string, bool)FrameworkElement.GetNextSibling()FrameworkElement.GetPrevSibling()FrameworkElement.NextSibling(string)FrameworkElement.NextSibling<T>()FrameworkElement.PreviousSibling(string)FrameworkElement.PreviousSibling<T>()FrameworkElement.AnySibling<T>()FrameworkElement.AnySibling(string)FrameworkElement.GetScreenRectangle()FrameworkElement.ScrollToVisible()FrameworkElement.ScrollToVisible(ScrollToVisibleType)FrameworkElement.EnsureClickable()FrameworkElement.ToXml()FrameworkElement.Refresh()FrameworkElement.Equals(object)FrameworkElement.GetHashCode()FrameworkElement.GetProperties()FrameworkElement.GetAttachedProperty<T>(string, string)FrameworkElement.SetAttachedProperty<T>(string, string, T)FrameworkElement.SetFocus()FrameworkElement.ValidateMouseLocationIfNeeded(Point)FrameworkElement.GetStringPresentation()FrameworkElement.ToRealObject()FrameworkElement.FromRealObject(object)FrameworkElement.ValidateType(Type, string)FrameworkElement.GetKnownControlTypes(TechnologyType)FrameworkElement.RegisterElement(Type, string)FrameworkElement.InitKnownWpfControlTypes()FrameworkElement.InitKnownSilverlightControlTypes()FrameworkElement.InitKnownXamlControlTypes(Type)FrameworkElement.GetControlTypeFromInterface(Type)FrameworkElement.Match(IFindExpression)FrameworkElement.SetDepth(int)FrameworkElement.AddChildNode(ITargetElement)FrameworkElement.SetClosingTag(ITargetElement)FrameworkElement.GetChildren()FrameworkElement.GetParent()FrameworkElement.GetHostParent()FrameworkElement.SetParent(ITargetElement)FrameworkElement.GetUniqueHashCode()FrameworkElement.ToString()FrameworkElement.Capture()FrameworkElement.CaptureImage()FrameworkElement.GetProperty<T>(string)FrameworkElement.GetPropertyTypeSafe(string)FrameworkElement.GetAutomationProperty(string)FrameworkElement.SetProperty(string, object)FrameworkElement.ActualWidthFrameworkElement.ActualHeightFrameworkElement.WidthFrameworkElement.HeightFrameworkElement.MinWidthFrameworkElement.MaxWidthFrameworkElement.MinHeightFrameworkElement.MaxHeightFrameworkElement.HorizontalAlignmentFrameworkElement.VerticalAlignmentFrameworkElement.MarginFrameworkElement.DesiredSizeFrameworkElement.RenderSizeFrameworkElement.NameFrameworkElement.OpacityFrameworkElement.ClipFrameworkElement.RenderTransformFrameworkElement.OpacityMaskFrameworkElement.RenderTransformOriginFrameworkElement.IsHitTestVisibleFrameworkElement.VisibilityFrameworkElement.UidFrameworkElement.MappingsFrameworkElement.AutomationIdFrameworkElement.XamlTagBaseFrameworkElement.TextBlockContentFrameworkElement.TextLiteralContentFrameworkElement.UserFrameworkElement.XamlTagFrameworkElement.WaitFrameworkElement.FindFrameworkElement.ApplicationFrameworkElement.AbsoluteTagIndexFrameworkElement.TagNameIndexFrameworkElement.AbsoluteSiblingTagIndexFrameworkElement.EnableValidateMouseLocationFrameworkElement.ToolTipTextFrameworkElement.ComputedVisibilityFrameworkElement.IsVisibleFrameworkElement.ChildrenFrameworkElement.TechnologyTypeFrameworkElement.DepthFrameworkElement.IsTestRegionFrameworkElement.ParsedElementFrameworkElement.HostAutomationObject<FrameworkElement>.GetProperty(AutomationProperty)AutomationObject<FrameworkElement>.GetProperty(AutomationProperty, object)AutomationObject<FrameworkElement>.SetProperty(AutomationProperty, object)AutomationObject<FrameworkElement>.InvokeMethod(AutomationMethod, params object[])AutomationObject<FrameworkElement>.InvokeMethod(string, params object[])AutomationObject<FrameworkElement>.Serialize()AutomationObject<FrameworkElement>.Deserialize(string)AutomationObject<FrameworkElement>.ReferenceAutomationObject<FrameworkElement>.PropertyBag

Constructors

RadDateTimePicker()

Initializes a new instance of the RadDateTimePicker class.

Declaration

cs-api-definition
public RadDateTimePicker()

Properties

Calendar

Gets the calendar from the popup if open; returns 'null' otherwise.

Declaration

cs-api-definition
public RadCalendar Calendar { get; }

Property Value

RadCalendar

Clock

Gets the clock control from the popup if open; returns 'null' otherwise.

Declaration

cs-api-definition
public DateTimePickerClock Clock { get; }

Property Value

DateTimePickerClock

Culture

Gets the Culture representation of the dateTimePicker.

Declaration

cs-api-definition
public string Culture { get; }

Property Value

string

Implements IRadDateTimePicker.Culture

IsDropDownOpen

Get whether the datetimepicker popup is opened. Returns 'false' also if the popup cannot be found with the current control template.

Declaration

cs-api-definition
public bool IsDropDownOpen { get; }

Property Value

bool

Implements IRadDateTimePicker.IsDropDownOpen

IsReadOnly

Gets whether the DateTimePicker is read only.

Declaration

cs-api-definition
public bool IsReadOnly { get; }

Property Value

bool

Implements IRadDateTimePicker.IsReadOnly

IsTooltipEnabled

Gets whether the DateTimePicker has it's tooltip enabled.

Declaration

cs-api-definition
public bool IsTooltipEnabled { get; }

Property Value

bool

Implements IRadDateTimePicker.IsTooltipEnabled

SelectedValue

Gets the DateTimePicker selected date via an automation property.

Declaration

cs-api-definition
public DateTime? SelectedValue { get; }

Property Value

DateTime?

Implements IRadDateTimePicker.SelectedValue

Text

Get the text of the DateTimePicker input text box.

Declaration

cs-api-definition
public override string Text { get; }

Property Value

string

Overrides FrameworkElement.Text

Implements IFrameworkElement.Text

TextBox

Get the DateTimePicker input text box.

Declaration

cs-api-definition
[Obsolete("The property is deprecated. Please use .TextBoxElement instead.")]
public RadWatermarkTextBox TextBox { get; }

Property Value

RadWatermarkTextBox

TextBoxElement

Get the DateTimePicker input text box.

Declaration

cs-api-definition
public FrameworkElement TextBoxElement { get; }

Property Value

FrameworkElement

Implements IRadDateTimePicker.TextBoxElement

TodayButton

Get the Today button.

Declaration

cs-api-definition
public IRadButton TodayButton { get; }

Property Value

IRadButton

Implements IRadDateTimePicker.TodayButton

Methods

MouseClick(MouseClickType)

Triggers mouse click on the text box from the given type.

Declaration

cs-api-definition
public void MouseClick(MouseClickType clickType)

Parameters

clickType

MouseClickType

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

cs-api-definition
public void MouseClick(MouseClickType clickType, int offset)

Parameters

clickType

MouseClickType

The mouse click type.

offset

int

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

cs-api-definition
public void MouseClick(MouseClickType clickType, int offset, bool offsetFromLeft)

Parameters

clickType

MouseClickType

The mouse click type.

offset

int

The offset to calculate the click point from.

offsetFromLeft

bool

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

cs-api-definition
public void SelectDate(string buttonText)

Parameters

buttonText

string

The text of the button to be clicked.

Exceptions

InvalidOperationException

Thrown when the DateTimePicker popup is not open.

ArgumentException

Thrown when the calendar has no buttons with the given text.

SelectTime(string)

Simulates user clicking on the clock button to select time.

Declaration

cs-api-definition
public void SelectTime(string buttonText)

Parameters

buttonText

string

The text of the button to be clicked.

Exceptions

ArgumentException

Thrown when the clock contains no button with the given text.

InvalidOperationException

Thrown when the DateTimePicker popup is not open.

TogglePopup()

Simulates user clicking on the calendar image to open/close the popup.

Declaration

cs-api-definition
public void TogglePopup()

Implements IRadDateTimePicker.TogglePopup()

TypeText(string)

Simulates user entering text into the DateTimePicker text box.

Declaration

cs-api-definition
public void TypeText(string text)

Parameters

text

string

The text to enter.

WaitPopupToClose(int)

Useful upon any action over the popup that closes it.

Declaration

cs-api-definition
public void WaitPopupToClose(int checkDuration)

Parameters

checkDuration

int

The duration in millis to wait for.