Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Igor123
Partner - Contributor
Partner - Contributor

Set localized dynamic date format (script) for date picker/calendar control?

Hi,

we have an app where we localize all GUI strings by loading all text to be shown from an external text file containing all languages, and the language to display is selected in a variable loaded from a config file. So when devloping the app we don't know what language our users will run, but that is configured for each customer site, and then "applied" at each data reload (it is then the local config file is read, which sets the language). 

We do this for the date and time formats as well, so they are set by the chosen language to a suitable format.

Now comes the problem; We'd like to use a calendar control (date picker) in the app, but it seems that the GUI for setting the date format locally in the control, AND globally in the app, does allow "date" to be chosen, but when it is chosen it simply sets the currently seleted language/date format, and then it is hard-coded from then on and not changed at the next reload. So depending on what we have set locally when developing the app, the variable or date picker sets a certain date format, and then when loaded on site, with a different config, it still uses the format that was set when the app was developed, and not the new dateformat variable in the app.

One solution could be that the date format "box" in the "Numbers" settings globally in the app, or locally in the controls, accepts formulas so we could retrieve the current dateformat variable each time instead of a hard-coded string. But qlikview doesn't seem to allow formulas in that box now, so are there any other ways to solve this?

(As a side note, we do manage to localize an initial value for the variable in the load script - it uses the date format set during reload, and the initial value of the date picker control looks correct according to the localized date format after a reload, but as soon as the user selects a value, it looks in the "hardcoded" num-definition for the variable instead (in app settings or locally in the controls settings), and there it can only have one constant date format, and not one dynamically set at reload).

0 Replies