Bug with DateTimePicker and switching Languages

Answered
0
0

Hi,

Thank you for fixing the  System.DateTimeExtensions problem in the latest build (1.4.95).

We have now discovered another problem with the DateTimePicker when switching languages (i.e. from English to French and vice versa). The language of the TextBox portion and the calendar drop down do not match the browser language when switched at runtime. Please see the little video and the example project.

Thanks,
Robin
HR Club.

 

 

  • You must to post comments
Best Answer
0
0

There is a better way to change the language now, you can assign it directly in code:

Application.CurrentCulture = CultureInfo.GetCultureInfo(“en”);

or

Application.CurrentCulture = CultureInfo.GetCultureInfo(“fr”);

However, please keep in mind that once an object has been created and localized Wisej cannot force a new creation (it would break anyone’s code) of all forms and controls. It’s up to your app to decide what to do if the language is changed after localized controls have been created. You can listen to the Application.CultureChanged event for that.

For the case attached, it’s enough to do this:

Application.CurrentCulture = CultureInfo.GetCultureInfo(“fr”);

Application.Reload();

Also, the URL remains “clean” without the lang parameter.

 

  • Robin Lao
    Works great! Thanks so much Luca! Robin
  • You must to post comments
0
0

Hi Robin,

Please find attached your sample re-written, using Luca’s suggestions

  • Robin Lao
    Thanks for the example Tiago.. much appreciated! Robin
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.