packages/ecl/components/ecl-date-block/ecl-date-block.component.ts
Component used to display a formatted date in a styled time element. Designed for use within content components such as content blocks or items.
| providers |
TranslateService
|
| selector | time[eclDateBlock] |
| imports |
DatePipe
|
| templateUrl | ./ecl-date-block.component.html |
Properties |
Methods |
Inputs |
HostBindings |
Accessors |
constructor()
|
| date |
Type : Date
|
|
The date to be displayed. If not null, it's used to generate the |
| dateFormat |
Type : string
|
Default value : 'dd/M/yyyy'
|
|
The format to be used when rendering the date string (Angular DatePipe format).
Default is |
| datetime |
Type : string
|
|
Sets the |
| day |
Type : string
|
|
Explicit string for day part of the date (optional). Used when date is not set or overridden manually. |
| month |
Type : string
|
|
Explicit string for month part of the date (optional). Used when date is not set or overridden manually. |
| monthTitle |
Type : string
|
|
Explicit string used as an accessible or verbose label for the month (optional). |
| variant |
Type : "ongoing" | "past"
|
Default value : null
|
|
Optional visual variant of the date block. Can be:
|
| year |
Type : string
|
|
Explicit string for year part of the date (optional). Used when date is not set or overridden manually. |
| class |
Type : string
|
| e2eAttr |
Type : any
|
| tabindex |
Type : number
|
| class |
Type : string
|
| getCssClasses | ||||||
getCssClasses(rootClass: string)
|
||||||
|
Parameters :
Returns :
string
|
| locale |
Type : string
|
Default value : 'en'
|
| cssClasses |
getcssClasses()
|
| datetime | ||||||
getdatetime()
|
||||||
|
Sets the
Returns :
string
|
||||||
setdatetime(value: unknown)
|
||||||
|
Parameters :
Returns :
void
|