Posted 10 April 2018, 11:09 pm EST
Hello Mark,
We are not sure whether there can be a good fix to this issue that works for all the culture with arbitrary format.
What we understand is if you are needing such date format, probably you are preferring some culture different from US one. In which case, we suggest you to use Short date format like this: ```
(_flex.Columns[“Hired”] as C1.WPF.DataGrid.DataGridDateTimeColumn).EditMode = C1.WPF.DataGrid.DataGridDateTimeColumnEditMode.Date;
(_flex.Columns[“Hired”] as C1.WPF.DataGrid.DataGridDateTimeColumn).DateFormat = C1.WPF.DateTimeEditors.C1DatePickerFormat.Short;
Along with this, you also need to make the application culture-aware, since our controls honor [b]FrameworkElement.Language[/b] property, for this you need to set [b]Language[/b] property according to [b]CurrentCulture[/b] settings used in application (by default it is current culture set by OS). OR if you wish to set some specific culture in your application, you should set both [b]Language[/b] and thread culture like this:```
// set thread culture
System.Threading.Thread.CurrentThread.CurrentCulture = System.Threading.Thread.CurrentThread.CurrentUICulture =
new System.Globalization.CultureInfo("en-GB");
// set language according to the current culture used in OS
this.Language = System.Windows.Markup.XmlLanguage.GetLanguage(System.Threading.Thread.CurrentThread.CurrentCulture.Name);
Using above code, we get ‘dd.MM.yyyy’ format in Russian culture, “dd-MM-yyyy” in Danish and “dd/MM/yyyy” for UK etc
Hope this helps.
Regards,
Ruchir Agarwal