I am developing a small mvc applicacion and I am facing a problem with the datetime and decimal properties of my entities, specially when creating or editing using the scaffolded views/controllers. I am using VS2017 in a machine with English (United States) regional settings.
This is my example class
public partial class Data
{
public int Id { get; set; }
public System.DateTime DateProp { get; set; }
public decimal DecProp { get; set; }
}
When I run the code everything works fine. I get to see and edit the values properly.
Now if I change the machine region and language settings to say, Spanish (Argentina) I do get to see the changes both in the listings and the edit pages
But when I want to either create or edit an existing entity I get validations from both fields.
Validation errors for datetime and decimal
I suspect it is the javascript validation. What can I do to either the classes/controllers/views to make an application that will work. No matter the machine's regional settings?
Any help will be greatly appreciated!