0
  • it is a web page (Asp.Net MVC), multi-language including english, latvian, lithuvian, russian, polonia.
  • For selecting a date we choose the jQuery-Ui-datepicker including extra localization files for each language. (Date is given as string: "DateTime".ToString("d", new CultureInfo("lv")) )

All runs fine with all languages at my development computer (Win10, DotNet 4.5, Visual Studio 2012).

Running the web application at the server (Windows Server 2012 R2) other languages without problems. But the latvian language leads to problems.

I added trace code around the CultureInfo for Latvian 'lv'. There is an difference between the CultureInfo.DateTimeFormat.ShortDatePattern between development notebook and web Server.

CultureInfo.DateTimeFormat.ShortDatePattern - my computer: 'dd.MM.yyyy' - web server : 'dd.MM.yyyy.'

the fastest solution would be: trim final point at datetime format. (the javascript seems to work without the 'final point')

  1. Is it a Framework Bug ?
    • which system needs a fix ? the server or my computer (inclusing javascript datepicker localization source)
  2. How to solve it in a nice way (so it doesnt seems hacky)

thanks, Mathias

  • If your computer has more recent version of .Net maybe you could try updating it also on server. From what you write, seems like a bug in the framework itself. – Rudy Aug 24 '16 at 12:38
  • I agree with Rudy above. You could also forgo the shortdatepattern and use your own mask in ToString() – Stinky Towel Aug 24 '16 at 14:34
  • Server Version 'dd.MM.yyyy.' seems korrekt. The Javascript file has also that format. I will ask/report Microsoft about that ?bug? with .Net at my computer. – cortadillo0815 Aug 26 '16 at 11:09
  • solving in a nice way: found at shackoverflow [custom datetime binding](http://stackoverflow.com/questions/528545/mvc-datetime-binding-with-incorrect-date-format) – cortadillo0815 Aug 26 '16 at 11:14

0 Answers0