Demos About Radzen
Search Results for

    Show / Hide Table of Contents

    Class RadzenDatePicker<TValue>

    RadzenDatePicker component.

    Inheritance
    System.Object
    RadzenComponent
    RadzenDatePicker<TValue>
    Implements
    IDisposable
    IRadzenFormComponent
    Inherited Members
    RadzenComponent.Attributes
    RadzenComponent.Element
    RadzenComponent.MouseEnter
    RadzenComponent.MouseLeave
    RadzenComponent.ContextMenu
    RadzenComponent.Culture
    RadzenComponent.DefaultCulture
    RadzenComponent.OnMouseEnter()
    RadzenComponent.OnMouseLeave()
    RadzenComponent.OnContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.Style
    RadzenComponent.Visible
    RadzenComponent.GetCssClass()
    RadzenComponent.GetId()
    RadzenComponent.Debounce(Func<Task>, Int32)
    RadzenComponent.UniqueID
    RadzenComponent.JSRuntime
    RadzenComponent.IsJSRuntimeAvailable
    RadzenComponent.Reference
    RadzenComponent.RaiseContextMenu(Microsoft.AspNetCore.Components.Web.MouseEventArgs)
    RadzenComponent.RaiseMouseEnter()
    RadzenComponent.RaiseMouseLeave()
    RadzenComponent.CurrentStyle
    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}")) />

    Constructors

    RadzenDatePicker()

    Initializes a new instance of the RadzenDatePicker<TValue> class.

    Declaration
    public RadzenDatePicker()

    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

    true if value can be cleared; otherwise, false.

    AllowInput

    Gets or sets a value indicating whether input is allowed.

    Declaration
    public bool AllowInput { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if input is allowed; otherwise, false.

    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>

    CurrentPlaceholder

    Gets the current placeholder. Returns empty string if this component is inside a RadzenFormField.

    Declaration
    protected string CurrentPlaceholder { get; }
    Property Value
    Type Description
    System.String

    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

    true if disabled; otherwise, false.

    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.

    FormFieldContext

    Gets or sets the FormFieldContext of the component

    Declaration
    public IFormFieldContext FormFieldContext { get; set; }
    Property Value
    Type Description
    IFormFieldContext

    HasValue

    Gets a value indicating whether this instance has value.

    Declaration
    public bool HasValue { get; }
    Property Value
    Type Description
    System.Boolean

    true if this instance has value; otherwise, false.

    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

    true if inline; otherwise, false.

    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

    true if this instance is bound; otherwise, false.

    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

    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.

    Declaration
    public bool PadMinutes { get; set; }
    Property Value
    Type Description
    System.Boolean

    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.

    Declaration
    public bool PadSeconds { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if hour component is padded; otherwise, false.

    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

    true if read only; otherwise, false.

    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

    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.

    Declaration
    public bool ShowCalendarWeek { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if calendar week is shown; otherwise, false.

    ShowDays

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

    Declaration
    public bool ShowDays { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if days part is shown; otherwise, false.

    ShowInput

    Gets or sets a value indicating whether the input box is shown. Ignored if ShowButton is false.

    Declaration
    public bool ShowInput { get; set; }
    Property Value
    Type Description
    System.Boolean

    true to show the input box; false to hide the input box.

    ShowSeconds

    Gets or sets a value indicating whether seconds are shown.

    Declaration
    public bool ShowSeconds { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if seconds are shown; otherwise, false.

    ShowTime

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

    Declaration
    public bool ShowTime { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if time part is shown; otherwise, false.

    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

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

    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

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

    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.

    YearFormat

    Gets ot sets the year format. Set to yyyy by default.

    Declaration
    public string YearFormat { get; set; }
    Property Value
    Type Description
    System.String

    YearFormatter

    Gets or sets the year formatter. Set to FormatYear by default. If set, this function will take precedence over YearFormat.

    Declaration
    public Func<int, string> YearFormatter { get; set; }
    Property Value
    Type Description
    Func<System.Int32, System.String>

    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
    RadzenComponent.Dispose()

    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
    RadzenComponent.GetComponentCssClass()

    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
    RadzenComponent.OnAfterRenderAsync(Boolean)

    OnInitialized()

    Called by the Blazor runtime.

    Declaration
    protected override void OnInitialized()
    Overrides
    RadzenComponent.OnInitialized()

    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
    Overrides
    RadzenComponent.SetParametersAsync(ParameterView)

    Implements

    IDisposable
    IRadzenFormComponent

    Introducing Radzen Blazor Studio

    Radzen Blazor Studio is a software development environment that empowers developers to design, build and deploy Blazor applications without the traditional hurdles. Write less code and get more done.

    Learn More

    Download Now
    Download Now
    In This Article
    Back to top Radzen Blazor Components, © 2018-2025 Radzen. Source Code licensed under MIT