I have a view model with several properties that are not displayed as desired. One of the properties is the datetime type. The other is int. In my view of Create, a datetime appears with a default value of 1/1/0001 12:00:00 AM , and int has a default value of 0 .
By default, empty fields are required. How to do it?
I already found [DefaultValue("")] and found that this does not affect this problem.
Thanks!
ASP.NET MVC 4 RC
source share