Time
Formats date and time ISO strings to consistent format. It works across iframes based on customer admin's settings.
Default
Copy Pug Copy HTML Open in playground Show code Hide code
<e-time datetime="2018-03-22T14:39:15.087"></e-time><e-time datetime="2018-03-22T14:39:15.087"></e-time>JavaScript Copy JavaScript
Variations
With seconds Copy Pug Copy HTML Open in playground Show code Hide code[format="ymdhis"]
<e-time datetime="2018-03-22T14:39:15.087" format="ymdhis"></e-time><e-time datetime="2018-03-22T14:39:15.087" format="ymdhis"></e-time>JavaScript Copy JavaScript
API Reference
Properties
| Name | Description | Type | Required | Default value |
|---|---|---|---|---|
| datetime | ISO date string (eg. 2018-03-22T14:39:15.087Z) which will be formatted based on admin config. If timezone is given, date will be displayed in the browser's timezone. | string | - | |
| format | Defines which parts will be shown. Valid values: "ymdhis", (alias: "datetime"), "ymdhi", "ymd" (alias: "date"), "mmd" | string | datetime |