Open rhousham opened 1 year ago
Nope tell a lie - that didn't work...
Seems like the fix is doing localization: { locale: 'en-US',//fix to make sure september is shortended to sep - rather than sept - which c# doesn't understand format: 'dd-MMM-yyyy' },
In the config
Or update the c# Global.asax.cs and add
System.Globalization.CultureInfo.DefaultThreadCurrentCulture = new System.Globalization.CultureInfo("en-GB");
System.Globalization.CultureInfo.DefaultThreadCurrentCulture.DateTimeFormat.AbbreviatedMonthNames = new string[] {
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec", ""
};
It looks like basically there is a difference between c# microsoft and the javascript short months - hence causing issues.
Hi unsure where this belongs, however if you are creating a new C# MVC application. In previous incarations of the datepicker the MMM format has returned back 3 digit months. This is still the case apart from September which returns back Sept.
C# Doesn't - out of the box - recognise this as a valid month/date. At least not in the Uk - great britain.
The fix - enter
In the web.config.
This seems to be down to the Intl.DateTimeFormat library and less tempusdominus - but thought I would save someone a job if they find this.