Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,477 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
This code
<InputDate id="Date" class="form-control"
placeholder="Date"
@bind-value="objWeatherForecast.Date" />
produces the following:
Error RZ10001 The type of component 'InputDate' cannot be inferred based on the values provided. Consider specifying the type arguments directly using the following attributes: 'TValue'.
The Same Issue is occurs for InputNumber and InputSelect
@Michael Luna - This code should work:
<EditForm Model="@exampleModel" OnValidSubmit="@HandleValidSubmit">
<InputDate @bind-Value="exampleModel.Date" />
<button type="submit">Submit</button>
</EditForm>
@code {
public class WeatherForecastClass
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
public string Summary { get; set; }
}
private WeatherForecastClass exampleModel = new WeatherForecastClass();
private void HandleValidSubmit()
{
}
}
Thanks. Was a casing problem the @bind-Value.