Dear all,
I am stuck with an issue relating to a date picker component in an MVC5 / Net 4.8 application. The issue also relates to another question regarding the display of dates in the date picker component, please refer to this post for details.
The actual date format is fine, however when selecting a date with a weekday of greater than 12 in either of the two date picker components, the input is underlined and I cannot submit the form, meaning the Controller method is not called at all (cf. screenshot in the zip).
Since numbers below twelve are fine, I assume that somehow the days must be treated as months. I would like to add that I am using a European date format, i.e. dd.MM.yyyy. I am also setting the culture in Global.asax.cs as follows:
public class MvcApplication : System.Web.HttpApplication
[SomeMoreConfiguration]
protected void Application_BeginRequest(Object sender, EventArgs e)
{
var newCulture = (CultureInfo)Thread.CurrentThread.CurrentCulture.Clone();
newCulture.DateTimeFormat.ShortDatePattern = "dd.MM.yyyy";
newCulture.DateTimeFormat.DateSeparator = ".";
Thread.CurrentThread.CurrentCulture = newCulture;
}
}
The culture is properly set to German. I also included my Index page for the component mentioned above.
Please do let me know if you require additional informational. Thanks a mil in advance for your help.
Kind regards
Chris
Attachment:
datepickerissue_307c2cbe.zip