Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Goal:
The end user must be able to set its own date time format.
Option that doesn't solve all of my problems:
the property FormatToken can be set for the Date Time Picker Widget to a Localization Token.
Same goes for Grid widget Column render settings.
Problem:
The Localization Token only sets the format for the dateTime string at a langue lvl.
Part of the solution:
I let the end user set its own DateTime Display settings, save that as User parameters.
A service that converts the DateTime to the string using the User parameters.
So, I call the service so when i need to display DateTime in a Grid or label so it converts it.
So displaying datetime format on a grid or label is solved. And works fine.
unsolved part:
But i cant do the same thing for the Date Time Picker Widget.
Because DateDelimiter and FormatToken properties are only Localizable and not Bindable i cant set them.
I can think of 2 dirty solutions
1 when i set the Localization Token from a i can make a service that overwrites the Token before displaying the Time Picker Widget.
2 make a Localization Table for each user.
Well my dirty solutions are so dirty that they should never be implemented.
Questions:
Can anyone think of a good solution?
Did any of you try to do this before?
Is there a way bind a Localization Token to a User parameter?(this would solve everything, and would be very powerful feature)
Solved! Go to Solution.
Well, i think it should be bindable. so i put it up as an idea:
It would be very easy to implement if the format was bindable.
I would pre-set what date time formats can be picked, vs. allowing the user to pick their own custom one.
Then you can have their datetime token of choice saved within their user extensions and then use something like an expression widget and services to format their data
A big list of pre-sets could work for me.
But then i still run in the same problem, if i want to set the FormatToken in the DateTimePicker Widget.
Because DateDelimiter and FormatToken properties are only Localizable and not Bindable.
Just checked this and indeed that isn't bindable
Not too sure what would work to give a user full range over their date time formatting that isn't 'language' bound
Well, i think it should be bindable. so i put it up as an idea:
It would be very easy to implement if the format was bindable.