Table of Contents

Class RadzenDatePicker<TValue>

Namespace
Radzen.Blazor
Assembly
Radzen.Blazor.dll

RadzenDatePicker component.

public class RadzenDatePicker<TValue> : RadzenComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable, IRadzenFormComponent

Type Parameters

TValue

The type of the t value.

Inheritance
RadzenDatePicker<TValue>
Implements
Inherited Members

Examples

<RadzenDatePicker @bind-Value=@someValue TValue="DateTime" Change=@(args => Console.WriteLine($"Selected date: {args}")) />

Constructors

RadzenDatePicker()

public RadzenDatePicker()

Fields

input

Gets input reference.

protected ElementReference input

Field Value

ElementReference

Properties

AllowClear

Gets or sets a value indicating whether value can be cleared.

[Parameter]
public bool AllowClear { get; set; }

Property Value

bool

true if value can be cleared; otherwise, false.

AllowInput

Gets or sets a value indicating whether input is allowed.

[Parameter]
public bool AllowInput { get; set; }

Property Value

bool

true if input is allowed; otherwise, false.

CalendarWeekTitle

Gets or sets the previous month aria label text.

[Parameter]
public string CalendarWeekTitle { get; set; }

Property Value

string

The previous month aria label text.

Change

Gets or sets the change callback.

[Parameter]
public EventCallback<DateTime?> Change { get; set; }

Property Value

EventCallback<DateTime?>

The change callback.

CurrentDateChanged

Gets or set the current date changed callback.

[Parameter]
public EventCallback<DateTime> CurrentDateChanged { get; set; }

Property Value

EventCallback<DateTime>

DateFormat

Gets or sets the date format.

[Parameter]
public string DateFormat { get; set; }

Property Value

string

The date format.

DateRender

Gets or sets the date render callback. Use it to set attributes.

[Parameter]
public Action<DateRenderEventArgs> DateRender { get; set; }

Property Value

Action<DateRenderEventArgs>

The date render callback.

Disabled

Gets or sets a value indicating whether this RadzenDatePicker<TValue> is disabled.

[Parameter]
public bool Disabled { get; set; }

Property Value

bool

true if disabled; otherwise, false.

EditContext

Gets or sets the edit context.

[CascadingParameter]
public EditContext EditContext { get; set; }

Property Value

EditContext

The edit context.

FieldIdentifier

Gets the field identifier.

public FieldIdentifier FieldIdentifier { get; }

Property Value

FieldIdentifier

The field identifier.

FooterTemplate

Gets or sets the footer template.

[Parameter]
public RenderFragment FooterTemplate { get; set; }

Property Value

RenderFragment

The footer template.

Form

Gets or sets the form.

[CascadingParameter]
public IRadzenForm Form { get; set; }

Property Value

IRadzenForm

The form.

FormattedValue

Gets the formatted value.

public string FormattedValue { get; }

Property Value

string

The formatted value.

HasValue

Gets a value indicating whether this instance has value.

public bool HasValue { get; }

Property Value

bool

true if this instance has value; otherwise, false.

HourFormat

Gets or sets the hour format.

[Parameter]
public string HourFormat { get; set; }

Property Value

string

The hour format.

HoursStep

Gets or sets the hours step.

[Parameter]
public string HoursStep { get; set; }

Property Value

string

The hours step.

InitialViewDate

Gets or sets the Initial Date/Month View.

[Parameter]
public DateTime? InitialViewDate { get; set; }

Property Value

DateTime?

The Initial Date/Month View.

Inline

Gets or sets a value indicating whether this RadzenDatePicker<TValue> is inline - only Calender.

[Parameter]
public bool Inline { get; set; }

Property Value

bool

true if inline; otherwise, false.

InputAttributes

Specifies additional custom attributes that will be rendered by the input.

[Parameter]
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }

Property Value

IReadOnlyDictionary<string, object>

The attributes.

InputClass

Gets or sets the input CSS class.

[Parameter]
public string InputClass { get; set; }

Property Value

string

The input CSS class.

IsBound

Gets a value indicating whether this instance is bound (ValueChanged callback has delegate).

public bool IsBound { get; }

Property Value

bool

true if this instance is bound; otherwise, false.

Kind

Gets or sets the kind of DateTime bind to control

[Parameter]
public DateTimeKind Kind { get; set; }

Property Value

DateTimeKind

Max

Gets or sets the Maximum Selectable Date.

[Parameter]
public DateTime? Max { get; set; }

Property Value

DateTime?

The Maximum Selectable Date.

Min

Gets or sets the Minimum Selectable Date.

[Parameter]
public DateTime? Min { get; set; }

Property Value

DateTime?

The Minimum Selectable Date.

MinutesStep

Gets or sets the minutes step.

[Parameter]
public string MinutesStep { get; set; }

Property Value

string

The minutes step.

Name

Gets or sets the name of the form component.

[Parameter]
public string Name { get; set; }

Property Value

string

The name.

NextMonthAriaLabel

Gets or sets the next month aria label text.

[Parameter]
public string NextMonthAriaLabel { get; set; }

Property Value

string

The next month aria label text.

OkAriaLabel

Gets or sets the OK button aria label text.

[Parameter]
public string OkAriaLabel { get; set; }

Property Value

string

The OK button aria label text.

PadHours

Gets or sets a value indicating whether the hour picker is padded with a leading zero.

[Parameter]
public bool PadHours { get; set; }

Property Value

bool

true if hour component is padded; otherwise, false.

PadMinutes

Gets or sets a value indicating whether the minute picker is padded with a leading zero.

[Parameter]
public bool PadMinutes { get; set; }

Property Value

bool

true if hour component is padded; otherwise, false.

PadSeconds

Gets or sets a value indicating whether the second picker is padded with a leading zero.

[Parameter]
public bool PadSeconds { get; set; }

Property Value

bool

true if hour component is padded; otherwise, false.

ParseInput

Parse the input using an function outside the Radzen-library

[Parameter]
public Func<string, DateTime?> ParseInput { get; set; }

Property Value

Func<string, DateTime?>

Placeholder

Gets or sets the input placeholder.

[Parameter]
public string Placeholder { get; set; }

Property Value

string

The input placeholder.

PopupRenderMode

Gets or sets the render mode.

[Parameter]
public PopupRenderMode PopupRenderMode { get; set; }

Property Value

PopupRenderMode

The render mode.

PrevMonthAriaLabel

Gets or sets the previous month aria label text.

[Parameter]
public string PrevMonthAriaLabel { get; set; }

Property Value

string

The previous month aria label text.

ReadOnly

Gets or sets a value indicating whether read only.

[Parameter]
public bool ReadOnly { get; set; }

Property Value

bool

true if read only; otherwise, false.

SecondsStep

Gets or sets the seconds step.

[Parameter]
public string SecondsStep { get; set; }

Property Value

string

The seconds step.

ShowButton

Gets or sets a value indicating whether popup datepicker button is shown.

[Parameter]
public bool ShowButton { get; set; }

Property Value

bool

true if need show button open datepicker popup; false if need hide button, click for input field open datepicker popup.

ShowCalendarWeek

Gets or sets a value indicating whether calendar week will be shown.

[Parameter]
public bool ShowCalendarWeek { get; set; }

Property Value

bool

true if calendar week is shown; otherwise, false.

ShowDays

Gets or sets a value indicating whether days part is shown.

[Parameter]
public bool ShowDays { get; set; }

Property Value

bool

true if days part is shown; otherwise, false.

ShowSeconds

Gets or sets a value indicating whether seconds are shown.

[Parameter]
public bool ShowSeconds { get; set; }

Property Value

bool

true if seconds are shown; otherwise, false.

ShowTime

Gets or sets a value indicating whether time part is shown.

[Parameter]
public bool ShowTime { get; set; }

Property Value

bool

true if time part is shown; otherwise, false.

ShowTimeOkButton

Gets or sets a value indicating whether time ok button is shown.

[Parameter]
public bool ShowTimeOkButton { get; set; }

Property Value

bool

true if time ok button is shown; otherwise, false.

TabIndex

Gets or sets the tab index.

[Parameter]
public int TabIndex { get; set; }

Property Value

int

The tab index.

TimeOnly

Gets or sets a value indicating whether time only can be set.

[Parameter]
public bool TimeOnly { get; set; }

Property Value

bool

true if time only can be set; otherwise, false.

ToggleAmPmAriaLabel

Gets or sets the toggle Am/Pm aria label text.

[Parameter]
public string ToggleAmPmAriaLabel { get; set; }

Property Value

string

The toggle Am/Pm aria label text.

ToggleAriaLabel

Gets or sets the toggle popup aria label text.

[Parameter]
public string ToggleAriaLabel { get; set; }

Property Value

string

The toggle popup aria label text.

Value

Gets or sets the value.

[Parameter]
public object Value { get; set; }

Property Value

object

The value.

ValueChanged

Gets or sets the value changed callback.

[Parameter]
public EventCallback<TValue> ValueChanged { get; set; }

Property Value

EventCallback<TValue>

The value changed callback.

ValueExpression

Gets or sets the value expression.

[Parameter]
public Expression<Func<TValue>> ValueExpression { get; set; }

Property Value

Expression<Func<TValue>>

The value expression.

YearRange

Gets or sets the year range.

[Parameter]
public string YearRange { get; set; }

Property Value

string

The year range.

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

Close()

Closes this instance popup.

public void Close()

Dispose()

public override void Dispose()

FocusAsync()

public ValueTask FocusAsync()

Returns

ValueTask

GetComponentCssClass()

protected override string GetComponentCssClass()

Returns

string

GetValue()

Gets the value.

public object GetValue()

Returns

object

System.Object.

OnAfterRenderAsync(bool)

protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender bool

Returns

Task

OnInitialized()

protected override void OnInitialized()

ParseDate()

Parses the date.

protected Task ParseDate()

Returns

Task

SetParametersAsync(ParameterView)

public override Task SetParametersAsync(ParameterView parameters)

Parameters

parameters ParameterView

Returns

Task