Format date within View in ASP.NET Core MVC

前端 未结 9 2141
借酒劲吻你
借酒劲吻你 2020-12-30 09:51

I have problem in regarding with converting the datetime to date using a model.

Model from Class Library

public partial class LoanCo         


        
9条回答
  •  失恋的感觉
    2020-12-30 10:23

    Add [DataType(DataType.Date)] in your model

    [Column(TypeName = "Date")]
    [DisplayName("Date of birth")]
    [DataType(DataType.Date)] 
    

提交回复
热议问题