search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

[dp.Locale] Can't get timeFormat value

Asked by Julien
5 years ago.

Hi,

I have a problem to display the scheduler when my app is in english (us).
When my dp2.locale != 'en-us', it works fine, because timeFormat is hh:mm:ss (24hours). When I send a 12hours format it doesn't work.

In my code I'm able to set the dp2.locale with the correct value ('en-us') but when I display in my console the dp2.locale.timeformat value, it's undefined.

So i'm not able to handle the language change.

There is a screenshot of what I send in the code, and what I have in the console:

Is anyone have an idea of how to fix this problem ?

Thanks a lot !

Answer posted by Julien
5 years ago.

Sorry, it's ok. I didn't use the constructor to create my dp2.locale variable .!

  • > dp2.locale = new DayPilot.Locale(jsonObj.data.settings[0].cultureInfo);

Still thanks for the time you spent reading this..!

Comment posted by Dan Letecky [DayPilot]
5 years ago.

Thanks for posting the solution, Julien!

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.