CAn someone troubleshoot my converter?
Content
I have an oj-input-date-time that I want to format in the clients local timezone. I have created this JS
PageModule.prototype.convertToLocalTimeZone = function() {
return [{
converter: {
"type": "datetime",
"options": {
"pattern": "MM/dd/yy hh:mm a",
"isoStrFormat": "utc",
"timeZone": Intl.DateTimeFormat().resolvedOptions().timeZone
}
},
}];
};
and tried to set it as follows
<oj-input-date-time value='[[typeof $current.data === "string" ? $current.data : null]]' readonly="true" :id="[['oj-input-date-time-548690015-1-' + $current.index]]" converter='{"type":"datetime","options":{{ $page.functions.convertToLocalTimeZone() }}'></oj-input-date-time>
I've also tried to return it as an object literal, and also as a single object instead of an array of cardinality 1 but no such luck. Any help would be appreciated