From ce32d42dec646994a677796d08872889c3dd94a5 Mon Sep 17 00:00:00 2001 From: Shivangi Shree Date: Fri, 14 Aug 2026 15:00:20 +0530 Subject: [PATCH] [ACS-10246] Add logic to make dates semantically conveyed --- .../components/date-cell/date-cell.component.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/core/src/lib/datatable/components/date-cell/date-cell.component.ts b/lib/core/src/lib/datatable/components/date-cell/date-cell.component.ts index 9ba78d30f1..d913f6b3b4 100644 --- a/lib/core/src/lib/datatable/components/date-cell/date-cell.component.ts +++ b/lib/core/src/lib/datatable/components/date-cell/date-cell.component.ts @@ -26,7 +26,9 @@ import { toSignal } from '@angular/core/rxjs-interop'; selector: 'adf-date-cell', template: ` @if (formattedDate()) { - {{ formattedDate() }} + } `, encapsulation: ViewEncapsulation.None, @@ -55,6 +57,12 @@ export class DateCellComponent extends DataTableCellComponent implements OnInit // Convert value$ observable to signal for reactive computation private readonly dateValue = toSignal(this.value$); + // Computed signal that automatically formats the date to ISO string for datetime attribute + protected readonly isoDate = computed(() => { + const date = this.dateValue(); + return date ? new Date(date).toISOString() : ''; + }); + // Computed signal that automatically formats the date based on value and config protected readonly formattedDate = computed(() => { const date = this.dateValue();