New to Telerik UI for WinForms? Start a free 30-day trial

Represents a date time editor.

Definition

Constructors

Initializes a new instance of the BaseDateTimeEditor class.

C#
public BaseDateTimeEditor()

Properties

Gets or sets the custom date/time format string.

C#
public string CustomFormat { get; set; }

Gets the data type reported by this editor, which is DateTime.

C#
public override Type DataType { get; }

Overrides: BaseInputEditor.DataType

Gets whether the editor value differs from its original value while remaining within MinValue and MaxValue.

C#
public override bool IsModified { get; }

Overrides: BaseInputEditor.IsModified

Gets or sets the maximum date and time that can be selected in the editor.

C#
public DateTime MaxValue { get; set; }

Gets or sets the minimum date and time that can be selected in the editor.

C#
public DateTime MinValue { get; set; }

The DateTime value assigned to the date picker when the Value is null

C#
public DateTime NullValue { get; set; }

Gets the selected date and time, returning null when it equals NullValue; assigning a null or unconvertible value resets the picker to its null date.

C#
public override object Value { get; set; }

Overrides: BaseInputEditor.Value

Methods

Selects the first editable date-mask segment and wires the calendar, popup, input, and value notifications for the edit session.

C#
public override void BeginEdit()

Overrides: BaseInputEditor.BeginEdit()

Creates the date-time picker element and configures its calendar footer and size when calendar behavior is available.

C#
protected override RadElement CreateEditorElement()
Returns:

RadElement

The picker element used by this editor.

Overrides: BaseInputEditor.CreateEditorElement()

Removes the edit-session subscriptions and closes the calendar popup.

C#
public override bool EndEdit()
Returns:

bool

true after the editor has ended the edit session.

Overrides: BaseInputEditor.EndEdit()

Associates the editor with its owner and initializes the picker from the supplied value when it can be converted to a date and time.

C#
public override void Initialize(object owner, object value)
Parameters:ownerobject

The element that owns the editor.

valueobject

The initial value to convert to DateTime.

Overrides: BaseInputEditor.Initialize(object, object)

Determines whether the current picker value is within the inclusive MinValue and MaxValue bounds.

C#
protected virtual bool IsCurrentDateValid()
Returns:

bool

true when the current value is within range; otherwise, false.

Updates mask-boundary state for Left and Right, or clears the null-date sentinel for other keys.

C#
protected virtual void OnKeyDown(KeyEventArgs e)
Parameters:eKeyEventArgs

The key-down event data.

Provides an override point for focus loss from the editor's text box when the calendar popup is closed.

C#
protected virtual void OnLostFocus()