Date component

Date

<DateEdit />

Usage

With bind attribute

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

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

@functions{
    DateTime? selectedDate;
}

With event

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

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

@functions{
    DateTime? selectedDate;

    void OnDateChanged( DateTime? date )
    {
        selectedDate = date;
    }
}