New to Telerik UI for BlazorStart a free 30-day trial

A component for selecting date and time with an input and popup calendar/time selector. Configure format via Format (default ), width through Width, and steps using DateTimePickerSteps. Supports open/close events (OnOpen/OnClose), calendar cell rendering via OnCalendarCellRender, week numbers (ShowWeekNumbers), auto switching/correction (AutoSwitchParts, AutoSwitchKeys, AutoCorrectParts), two–digit year handling (TwoDigitYearMax), and caret input mode (AllowCaretMode). Programmatic API: CloseAsync() and Close().

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Type Parameters:

T

Syntax:

C#
public class TelerikDateTimePicker<T> : TelerikPickerBase<T>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikInputBase<T>TelerikPickerBase<T>TelerikDateTimePicker<T>...

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members TelerikPickerBase<T>.OnInitializedAsync()TelerikPickerBase<T>.OnAfterRenderAsync(bool)TelerikPickerBase<T>.Dispose()TelerikPickerBase<T>.Open()TelerikPickerBase<T>.Refresh()TelerikPickerBase<T>.ShowClearButtonTelerikPickerBase<T>.AdaptiveModeTelerikPickerBase<T>.PlaceholderTelerikPickerBase<T>.AutoCompleteTelerikPickerBase<T>.PopupClassTelerikPickerBase<T>.DebounceDelayTelerikPickerBase<T>.MinTelerikPickerBase<T>.MaxTelerikPickerBase<T>.ChildContentTelerikPickerBase<T>.TitleTelerikPickerBase<T>.SubtitleTelerikPickerBase<T>.ReadOnlyTelerikPickerBase<T>.ShowOtherMonthDaysTelerikPickerBase<T>.DataSmartPasteDescriptionAttributeTelerikPickerBase<T>.FillModeTelerikPickerBase<T>.RoundedTelerikPickerBase<T>.SizeTelerikInputBase<T>.SetParametersAsync(ParameterView)TelerikInputBase<T>.OnParametersSetAsync()TelerikInputBase<T>.FocusAsync()TelerikInputBase<T>.CascadedEditContextTelerikInputBase<T>.FloatingLabelTelerikInputBase<T>.IdTelerikInputBase<T>.EnabledTelerikInputBase<T>.TabIndexTelerikInputBase<T>.ValueExpressionTelerikInputBase<T>.ValueChangedTelerikInputBase<T>.ValueTelerikInputBase<T>.OnChangeTelerikInputBase<T>.OnBlurTelerikInputBase<T>.AriaLabelTelerikInputBase<T>.AriaLabelledByTelerikInputBase<T>.AriaDescribedByTelerikInputBase<T>.ValidateOnTelerikInputBase<T>.InputModeBaseComponent.ShouldRender()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)...

Constructors

C#
public TelerikDateTimePicker()

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

Closes the component.

C#
public override void Close()

Overrides: TelerikPickerBase<T>.Close()

Hides the picker popup.

C#
public Task CloseAsync()
Returns:

Task

C#
protected override void OnParametersSet()

Overrides: ComponentBase.OnParametersSet()

Properties

Specifies if a caret can be displayed during input (when possible).

C#
[Parameter]
public bool AllowCaretMode { get; set; }

Specifies if date parts will be auto corrected.

C#
[Parameter]
public bool AutoCorrectParts { get; set; }

Specifies which keys should switch date parts.

C#
[Parameter]
public List<object> AutoSwitchKeys { get; set; }

Specifies if date parts will be automatically switched when completed.

C#
[Parameter]
public bool AutoSwitchParts { get; set; }

Provides configuration for WebMCP tools, such as a Name to distinguish this DateTimePicker from others on the same page.

C#
[Parameter]
public RenderFragment DateTimePickerSettings { get; set; }

Enables WebMCP tool registration for this DateTimePicker. When true, DateTimePicker operations are exposed as tools discoverable by AI models through the browser. Default value is false.

C#
[Parameter]
public bool EnableWebMcpTools { get; set; }

Specifies the format of the DateInput of the DateTimePicker.

C#
[Parameter]
public override string Format { get; set; }

Overrides: TelerikPickerBase<T>.Format

Fires each time a calendar cell renders. Use the event to add a custom CSS class to each calendar cell based on its value.

C#
[Parameter]
public Action<DateTimePickerCalendarCellRenderEventArgs> OnCalendarCellRender { get; set; }

Defines the OnClose Event which is fired before the popup of the DateTimePicker is closed.

C#
[Parameter]
public EventCallback<DateTimePickerCloseEventArgs> OnClose { get; set; }

Defines the OnOpen Event which is fired before the popup of the DateTimePicker is opened.

C#
[Parameter]
public EventCallback<DateTimePickerOpenEventArgs> OnOpen { get; set; }

Defines if additional week number column is added.

C#
[Parameter]
public bool ShowWeekNumbers { get; set; }

Specifies the maximum year to assume to be from the current century when typing two-digit year value. The default value is 68, indicating that typing any value less than 69 will be assumed to be 20xx, while 69 and larger will be assumed to be 19xx.

C#
[Parameter]
public int TwoDigitYearMax { get; set; }

Specifies the width of the DateTimePicker.

C#
[Parameter]
public string Width { get; set; }