<EditForm Model="@_newRegister" OnValidSubmit="@HandleValidSubmit">
<DataAnnotationsValidator />
<ValidationSummary />
<div class="container-fluid">
<div class="row">
<div class="col-6">
<div class="form-group">
<MudDatePicker Label="Collection Date" Editable="true" @bind-Date="_newRegister.CollectionDate" />
</div>
</div>
</div>
</div>
</Editform>
@code{
private Register _newRegister = new x.Shared.Register
{
ProcessingDate = DateTime.Today,
CollectionDate = DateTime.Today,
ModifiedDate = DateTime.Today,
CreateDate = DateTime.Today
};
private string Success = "";
DateTime? date = DateTime.Today;
public void HandleValidSubmit()
{
Success = "Success";
}
)
Run Code Online (Sandbox Code Playgroud)
public class Register
{
[Key]
public int ID { get; set; }
public String CustomerName …
Run Code Online (Sandbox Code Playgroud)