I have the following code:
For instance, I set US culture in my browser. Everything changes accordingly in my page output.
However, RadDateTimePicker keeps showing datetime in some specific - I guess, OS-defined, format and does not care this setting.
How to fix this?
I just want it to pick up the culture, set for the thread - I don't want to write special code for every RadDateTimePicker on my pages - I have tons of them!
void
Application_BeginRequest(
object
sender, EventArgs e)
{
var culture = Culture.GetBrowserOrDefaultCulture();
culture.DateTimeFormat.ShortTimePattern =
"HH:mm:ss"
;
culture.DateTimeFormat.LongTimePattern =
"HH:mm:ss"
;
Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;
}
For instance, I set US culture in my browser. Everything changes accordingly in my page output.
However, RadDateTimePicker keeps showing datetime in some specific - I guess, OS-defined, format and does not care this setting.
How to fix this?
I just want it to pick up the culture, set for the thread - I don't want to write special code for every RadDateTimePicker on my pages - I have tons of them!