Open
Description
Hey guys!
I'm trying to retrieve the Date Input value when used in a blazor custom component but I'm not having success.
Could someone help me with this please?
//**********************************
//START -- BLAZORPAGE.razor
//**********************************
@code
{
public DateOnly? date1 { get; set; }
private void OnClickSave()
{
date1 = date1;
DateOnly? NewValue = date1;
NewValue = NewValue;
}
}
//END-- BLAZORPAGE.razor
//**********************************
//START -- MyComponent.razor
//**********************************
@code {
[Parameter]
public DateOnly? date1 { get; set; }
public void DateChanged(DateOnly? newValue)
{
date1 = newValue;
}
public void ChangeDate() => date1 = DateOnly.FromDateTime(DateTime.Now.AddDays(3));
}
//END-- MyComponent.razor
Grateful!