Last post Aug 26, 2019 11:12 AM by Rob warning
Aug 26, 2019 10:15 AM|Rob warning|LINK
I am developing a app that is making intensive use of Datetime calculations. On my development machine I have my Regional setting on Dutch.
I am hosting my app on a server in the UK. Now when I set in razor a HTML data field with a Datetime value like this:
On my development machine it renders with "-" between the year, Month and Day component. but on the UK server a "/" is appearing.
Since I am using this Date in Jquery selections, things go very wrong.
Is there a way to force the production server to use the Dutch formatting? Or is there an other trick to make this working?
Aug 26, 2019 10:32 AM|maherjendoubi|LINK
You can use the following middleware in the Startup.cs file for your production:
var supportedCultures = new
DefaultRequestCulture = new RequestCulture("nl-NL"),
// Formatting numbers, dates, etc.
SupportedCultures = supportedCultures,
// UI strings that we have localized.
SupportedUICultures = supportedCultures
// To configure external authentication,
// see: http://go.microsoft.com/fwlink/?LinkID=532715
Aug 26, 2019 11:12 AM|Rob warning|LINK
Jou are my hero!