Hi,
I need to dynamically modify the date and time format displayed by a RadDateTimePicker, in the InputBox and the Clock view.
I am able to change the format of the date and time displayed in the Input box using this code:
var culture = new CultureInfo("en-US"); // or "fr-FR"
var dtfInfo = new DateTimeFormatInfo();
dtfInfo.ShortDatePattern = "M/d/yyyy"; // or "yyyy-MM-dd" for fr-FR
dtfInfo.LongDatePattern = "M/d/yyyy"; // idem
dtfInfo.DateSeparator = "/"; // "-" for fr-FR
dtfInfo.ShortTimePattern = "h:mm tt"; // HH:mm for fr-FR
dtfInfo.LongTimePattern = "h:mm tt"; // idem
dtfInfo.TimeSeparator = ":";
culture.DateTimeFormat = dtfInfo;
System.Threading.Thread.CurrentThread.CurrentCulture = culture;
System.Threading.Thread.CurrentThread.CurrentUICulture = culture;
However, it seems this code has no effect on the format of the time items displayed by the Clock view , opened after the change of date and time patterns.
How to customize the formatting of the time items displayed in the Clock ?
I am testing with either "en-US" or "fr-FR" cultures.
Thx,
Alain