# EclDateBlockComponent

**Type:** component



Component used to display a formatted date in a styled time element.
Designed for use within content components such as content blocks or items.


**Selector:** `time[eclDateBlock]`

## Inputs
- **date**: `Date` - The date to be displayed. If not null, it's used to generate the `datetime` attribute and visual output.
- **dateFormat**: `string` - The format to be used when rendering the date string (Angular DatePipe format). Default is `'dd/M/yyyy'`.
- **datetime**: `string` - Sets the `datetime` attribute of the `<time>` element. If not provided, it is derived from `date` and `dateFormat`.
- **day**: `string` - Explicit string for day part of the date (optional). Used when date is not set or overridden manually.
- **month**: `string` - Explicit string for month part of the date (optional). Used when date is not set or overridden manually.
- **monthTitle**: `string` - Explicit string used as an accessible or verbose label for the month (optional).
- **variant**: `"ongoing" | "past"` - Optional visual variant of the date block. Can be: - `'ongoing'`: for ongoing events - `'past'`: for past events This changes styling only.
- **year**: `string` - Explicit string for year part of the date (optional). Used when date is not set or overridden manually.
- **class**: `string` - 
- **e2eAttr**: `any` - 
- **tabindex**: `number` - 
