DateTime in ASP.Net Core at Azure
I did the ASP.Net Core MVC web app in Azure. I found all DateTime values are displayed in US format. Even I set in Startup.cs set DefaultRequestCulture to be en-au. It does not work. Finally, I used to use DisplayFormat attribute in The object.
Code
[DisplayFormat(DataFormatString = @"{0:dd\/MM\/yyyy}", ApplyFormatInEditMode = true)] | |
public DateTime? DateTime { get; set; } |
That works in display form. Moreover, the input field will display value in this format.
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
Feedback awaiting moderation
This post has 136 feedbacks awaiting moderation...
Form is loading...