Plumsails Lookup item format
I have a plumsails lookup-field, which shows the Lookup-item an in addition another column from the target-list. This column ist a date-field.
When I display this date with the item-format Item['Datefield'] it shows the date like "yyyy-mm-ddThh:mm:ssZ".
How can I display the date like dd.mm.yyyy?
When I display this date with the item-format Item['Datefield'] it shows the date like "yyyy-mm-ddThh:mm:ssZ".
How can I display the date like dd.mm.yyyy?
-
- Moderator
- Posts: 33
- Joined: Wed Sep 21, 2016
Hi! Use this code in Item Format, please:
Code: Select all
function(item) {
function format(dateString) {
if(!dateString) return dateString;
var result = new Date(dateString).toLocaleDateString();
return result;
}
return '<span class="csl-option">' + format(item["{LookupField}"]) + '</span>'
}
-
- Information
-
Who is online
Users browsing this forum: No registered users and 3 guests