Dear Radzen team,
we are testing the Radzen Blazor (prior possible migration) and we noticed that for create form, there are pre-filled values for mandatory fields (for numeric and date input):
It is not so user-friendly - we would expect, that those fields will be empty for first create form unless we as a developer want to set some default value.
For example for the year in datepicker you have to scroll long way to select proper year (because selected year is 0001).
This is default(DateTime) the default value of your property bound to the DatePicker.
In addition if you want to have model properties with empty default values you may consider making them nullable. If your database columns are nullable Radzen Studio will infer them as such and then the UI will display empty values.
Other than that model properties in C# have default values depending on the type -
0 for numeric types and
DateTime.MinValue for dates.
Is it possible to make the model property nullable and the database field mandatory?
I do not want to free up the model validation in the layer database, which I would consider an antipattern.
Not without changing the code manually after infer.