I have a text input on my form which when sent to the server is bound to the DateTime property of my model in the wrong format, it comes out as MM/dd/yyyy
instead of dd/MM/yyyy
.
The best suggestion I have seen so far is to set the serializer culture as below, however it didn't seem to make a difference.
services.AddMvc()
.AddJsonOptions(options =>
{
options.SerializerSettings.Culture = new CultureInfo("en-GB");
});
I don't see why I would have to use a custom model binder, this seems like something which should be resolved with culture.