UFM: Datetime filter #21420
bjarnef
started this conversation in
Features and ideas
Replies: 1 comment
-
|
@leekelleher I noticed UFM It as passed in directly in JavaScript expression, or is there as way to retrieve this dynamically based on back office user language? We can probably have a similar one to handle formatting of dates. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
With UFM we can use JavaScript expressions:
https://docs.umbraco.com/umbraco-cms/reference/umbraco-flavored-markdown#syntax-1
However often, e.g. in collection layout, we want to format date, time or date with time properties considering current backoffice users culture/language.
In the old backoffice we could use moment.js something like this:
or something like this (but I recall, it broke in e.g. Danish because the value wasn't in invariant format).
This render a date string:
but this didn't seem to work:
a simple solution where only date picker is used:
Do we have the ability to access culture from backoffice in UFM (eventually in custom filter)?
However something like this OOTB would be useful (maybe it can be combined):
or with JS-expression assuming
cultureis a variable available:Beta Was this translation helpful? Give feedback.
All reactions