CAn someone troubleshoot my converter? — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Get Started with Redwood: Oracle Cloud SCM and Purchasing

CAn someone troubleshoot my converter?

edited Dec 17, 2018 3:15PM in Visual Builder 3 comments

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

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!