Date component


<DateEdit />


With bind attribute

By using bind-* attribute the selected date will be automatically assigned to the member variable.

<DateEdit @bind-Date="@selectedDate" />

    DateTime? selectedDate;

With event

When using the event DateChanged, you also must define the Date value attribute.

<DateEdit Date="@selectedDate" DateChanged="@OnDateChanged" />

    DateTime? selectedDate;

    void OnDateChanged( DateTime? date )
        selectedDate = date;


Name Type Default Description
Date DateTime? null Gets or sets the input date value.
DateChanged event   Occurs when the date has changed.
Min DateTime? null The earliest date to accept.
Max DateTime? null The latest date to accept.
Pattern string null The pattern attribute specifies a regular expression that the input element’s value is checked against on form submission.
Placeholder string null Sets the placeholder for the empty date.