Date - Web Component
...
Browser support
Parameters
The Web component uses a <z-date>
tag.
The parametrization of the component can be done with the following custom HTML params:
Name | Type | Description |
---|---|---|
value (optional) | string | The date to be displayed in the component. If none is provided, shows the current date |
weekday (optional) | string | The weekday to be displayed in the component. Possible values are: |
locale (optional) | string | The locale to be used. If not set, the default locale of the browser will be used. |
with-weekday (optional) | boolean | If `true`, only the weekday will be displayed. |
Playground
Customization
HTML Examples
Imports
html
<link rel="stylesheet" href="/0.3.7/@zurich/web-components/styles.css" />
<script type="module" src="/0.3.7/@zurich/web-components/date.js"></script>
Code
html
<z-date value="1991-09-21"></z-date>
<z-date value="1991-09-21" locale="zh"></z-date>
<z-date value="1991-09-21" weekday="short"></z-date>
<z-date value="1991-09-21" with-weekday></z-date>
<z-date value="1991-09-21" locale="es" with-weekday></z-date>