Why is DisplayFormat DataFormatString not working?

前端 未结 8 799
名媛妹妹
名媛妹妹 2020-11-29 05:27

I have a property in my view model as follows:

[Editable(false)]
[Display(Name = \"Date\")]
[DisplayFormat(DataFormatString = \"{0:yyyy/MM/dd}\", ApplyFormat         


        
8条回答
  •  春和景丽
    2020-11-29 05:57

    I had a similar issue with a datepicker which was showing the date in the wrong order. Fixed it by using the HTML 5 value field. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date

    
    

提交回复
热议问题