Class RadzenDatePicker<TValue>
RadzenDatePicker component.
Inherited Members
Namespace: Radzen.Blazor
Assembly: Radzen.Blazor.dll
Syntax
public class RadzenDatePicker<TValue> : RadzenComponent, IDisposable, IRadzenFormComponent
Type Parameters
Name | Description |
---|---|
TValue | The type of the t value. |
Examples
<RadzenDatePicker @bind-Value=@someValue TValue="DateTime" Change=@(args => Console.WriteLine($"Selected date: {args}")) />
Fields
input
Gets input reference.
Declaration
protected ElementReference input
Field Value
Type | Description |
---|---|
ElementReference |
Properties
AllowClear
Gets or sets a value indicating whether value can be cleared.
Declaration
public bool AllowClear { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
AllowInput
Gets or sets a value indicating whether input is allowed.
Declaration
public bool AllowInput { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ButtonClass
Gets or sets the button CSS class.
Declaration
public string ButtonClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The button CSS class. |
CalendarWeekTitle
Gets or sets the previous month aria label text.
Declaration
public string CalendarWeekTitle { get; set; }
Property Value
Type | Description |
---|---|
System.String | The previous month aria label text. |
Change
Gets or sets the change callback.
Declaration
public EventCallback<DateTime?> Change { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<System.Nullable<DateTime>> | The change callback. |
CurrentDateChanged
Gets or set the current date changed callback.
Declaration
public EventCallback<DateTime> CurrentDateChanged { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<DateTime> |
DateFormat
Gets or sets the date format.
Declaration
public string DateFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String | The date format. |
DateRender
Gets or sets the date render callback. Use it to set attributes.
Declaration
public Action<DateRenderEventArgs> DateRender { get; set; }
Property Value
Type | Description |
---|---|
Action<DateRenderEventArgs> | The date render callback. |
Disabled
Gets or sets a value indicating whether this RadzenDatePicker<TValue> is disabled.
Declaration
public bool Disabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EditContext
Gets or sets the edit context.
Declaration
public EditContext EditContext { get; set; }
Property Value
Type | Description |
---|---|
EditContext | The edit context. |
FieldIdentifier
Gets the field identifier.
Declaration
public FieldIdentifier FieldIdentifier { get; }
Property Value
Type | Description |
---|---|
FieldIdentifier | The field identifier. |
FooterTemplate
Gets or sets the footer template.
Declaration
public RenderFragment FooterTemplate { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment | The footer template. |
Form
Gets or sets the form.
Declaration
public IRadzenForm Form { get; set; }
Property Value
Type | Description |
---|---|
IRadzenForm | The form. |
FormattedValue
Gets the formatted value.
Declaration
public string FormattedValue { get; }
Property Value
Type | Description |
---|---|
System.String | The formatted value. |
HasValue
Gets a value indicating whether this instance has value.
Declaration
public bool HasValue { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
HourFormat
Gets or sets the hour format.
Declaration
public string HourFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String | The hour format. |
HoursStep
Gets or sets the hours step.
Declaration
public string HoursStep { get; set; }
Property Value
Type | Description |
---|---|
System.String | The hours step. |
InitialViewDate
Gets or sets the Initial Date/Month View.
Declaration
public DateTime? InitialViewDate { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<DateTime> | The Initial Date/Month View. |
Inline
Gets or sets a value indicating whether this RadzenDatePicker<TValue> is inline - only Calender.
Declaration
public bool Inline { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
InputAttributes
Specifies additional custom attributes that will be rendered by the input.
Declaration
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
Property Value
Type | Description |
---|---|
IReadOnlyDictionary<System.String, System.Object> | The attributes. |
InputClass
Gets or sets the input CSS class.
Declaration
public string InputClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The input CSS class. |
IsBound
Gets a value indicating whether this instance is bound (ValueChanged callback has delegate).
Declaration
public bool IsBound { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Kind
Gets or sets the kind of DateTime bind to control
Declaration
public DateTimeKind Kind { get; set; }
Property Value
Type | Description |
---|---|
DateTimeKind |
Max
Gets or sets the Maximum Selectable Date.
Declaration
public DateTime? Max { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<DateTime> | The Maximum Selectable Date. |
Min
Gets or sets the Minimum Selectable Date.
Declaration
public DateTime? Min { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<DateTime> | The Minimum Selectable Date. |
MinutesStep
Gets or sets the minutes step.
Declaration
public string MinutesStep { get; set; }
Property Value
Type | Description |
---|---|
System.String | The minutes step. |
Name
Gets or sets the name of the form component.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name. |
NextMonthAriaLabel
Gets or sets the next month aria label text.
Declaration
public string NextMonthAriaLabel { get; set; }
Property Value
Type | Description |
---|---|
System.String | The next month aria label text. |
OkAriaLabel
Gets or sets the OK button aria label text.
Declaration
public string OkAriaLabel { get; set; }
Property Value
Type | Description |
---|---|
System.String | The OK button aria label text. |
PadHours
Gets or sets a value indicating whether the hour picker is padded with a leading zero.
Declaration
public bool PadHours { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
PadMinutes
Gets or sets a value indicating whether the minute picker is padded with a leading zero.
Declaration
public bool PadMinutes { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
PadSeconds
Gets or sets a value indicating whether the second picker is padded with a leading zero.
Declaration
public bool PadSeconds { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ParseInput
Parse the input using an function outside the Radzen-library
Declaration
public Func<string, DateTime?> ParseInput { get; set; }
Property Value
Type | Description |
---|---|
Func<System.String, System.Nullable<DateTime>> |
Placeholder
Gets or sets the input placeholder.
Declaration
public string Placeholder { get; set; }
Property Value
Type | Description |
---|---|
System.String | The input placeholder. |
PopupRenderMode
Gets or sets the render mode.
Declaration
public PopupRenderMode PopupRenderMode { get; set; }
Property Value
Type | Description |
---|---|
PopupRenderMode | The render mode. |
PrevMonthAriaLabel
Gets or sets the previous month aria label text.
Declaration
public string PrevMonthAriaLabel { get; set; }
Property Value
Type | Description |
---|---|
System.String | The previous month aria label text. |
ReadOnly
Gets or sets a value indicating whether read only.
Declaration
public bool ReadOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
SecondsStep
Gets or sets the seconds step.
Declaration
public string SecondsStep { get; set; }
Property Value
Type | Description |
---|---|
System.String | The seconds step. |
ShowButton
Gets or sets a value indicating whether popup datepicker button is shown.
Declaration
public bool ShowButton { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ShowCalendarWeek
Gets or sets a value indicating whether calendar week will be shown.
Declaration
public bool ShowCalendarWeek { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ShowDays
Gets or sets a value indicating whether days part is shown.
Declaration
public bool ShowDays { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ShowSeconds
Gets or sets a value indicating whether seconds are shown.
Declaration
public bool ShowSeconds { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ShowTime
Gets or sets a value indicating whether time part is shown.
Declaration
public bool ShowTime { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ShowTimeOkButton
Gets or sets a value indicating whether time ok button is shown.
Declaration
public bool ShowTimeOkButton { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
TabIndex
Gets or sets the tab index.
Declaration
public int TabIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The tab index. |
TimeOnly
Gets or sets a value indicating whether time only can be set.
Declaration
public bool TimeOnly { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ToggleAmPmAriaLabel
Gets or sets the toggle Am/Pm aria label text.
Declaration
public string ToggleAmPmAriaLabel { get; set; }
Property Value
Type | Description |
---|---|
System.String | The toggle Am/Pm aria label text. |
ToggleAriaLabel
Gets or sets the toggle popup aria label text.
Declaration
public string ToggleAriaLabel { get; set; }
Property Value
Type | Description |
---|---|
System.String | The toggle popup aria label text. |
Value
Gets or sets the value.
Declaration
public object Value { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The value. |
ValueChanged
Gets or sets the value changed callback.
Declaration
public EventCallback<TValue> ValueChanged { get; set; }
Property Value
Type | Description |
---|---|
EventCallback<TValue> | The value changed callback. |
ValueExpression
Gets or sets the value expression.
Declaration
public Expression<Func<TValue>> ValueExpression { get; set; }
Property Value
Type | Description |
---|---|
Expression<Func<TValue>> | The value expression. |
YearRange
Gets or sets the year range.
Declaration
public string YearRange { get; set; }
Property Value
Type | Description |
---|---|
System.String | The year range. |
Methods
Close()
Closes this instance popup.
Declaration
public void Close()
Dispose()
Detaches event handlers and disposes Reference.
Declaration
public override void Dispose()
Overrides
FocusAsync()
Sets the focus.
Declaration
public async ValueTask FocusAsync()
Returns
Type | Description |
---|---|
ValueTask |
GetComponentCssClass()
Gets the component CSS class.
Declaration
protected override string GetComponentCssClass()
Returns
Type | Description |
---|---|
System.String |
Overrides
GetValue()
Gets the value.
Declaration
public object GetValue()
Returns
Type | Description |
---|---|
System.Object | System.Object. |
OnAfterRenderAsync(Boolean)
Called by the Blazor runtime.
Declaration
protected override async Task OnAfterRenderAsync(bool firstRender)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | firstRender |
Returns
Type | Description |
---|---|
Task |
Overrides
OnInitialized()
Called by the Blazor runtime.
Declaration
protected override void OnInitialized()
Overrides
ParseDate()
Parses the date.
Declaration
protected async Task ParseDate()
Returns
Type | Description |
---|---|
Task |
SetParametersAsync(ParameterView)
Called by the Blazor runtime when parameters are set.
Declaration
public override async Task SetParametersAsync(ParameterView parameters)
Parameters
Type | Name | Description |
---|---|---|
ParameterView | parameters | The parameters. |
Returns
Type | Description |
---|---|
Task |