I have MVC web application and I am supporting 2 languages(Arabic, English).
I have post-action which takes the following model:
public class MyModel
{
public DateTimeOffset StartDate { get; set; }
public DateTimeOffset EndDate { get; set; }
}
When UI language is English it serializes the following date formate "dd/MM/yyyy" perfectly after adding globalization config inside web.config:
<globalization uiCulture="en" culture="en-GB" />
but when UI language is Arabic they are serialized into 0001-01-01T00:00:00 +00:00 (even the value posted by Jquery is startDate: 26/08/2020)
So how can I configure my web application to support binding the "dd/MM/yyyy" format for all cultures?
Try using this