@@ -14,7 +14,7 @@ import {
1414 TemplateRef ,
1515 TrackByFunction ,
1616} from '@angular/core' ;
17- import { AsyncPipe , formatDate , NgComponentOutlet , NgTemplateOutlet } from '@angular/common' ;
17+ import { AsyncPipe , NgComponentOutlet , NgTemplateOutlet } from '@angular/common' ;
1818
1919import { Observable , filter , map } from 'rxjs' ;
2020
@@ -24,13 +24,12 @@ import { NgxDatatableModule } from '@swimlane/ngx-datatable';
2424import {
2525 ABP ,
2626 ConfigStateService ,
27- getShortDateFormat ,
28- getShortDateShortTimeFormat ,
29- getShortTimeFormat ,
3027 ListService ,
3128 LocalizationModule ,
3229 PermissionDirective ,
3330 PermissionService ,
31+ TimezoneService ,
32+ UtcToLocalPipe ,
3433} from '@abp/ng.core' ;
3534import {
3635 AbpVisibleDirective ,
@@ -64,6 +63,7 @@ const DEFAULT_ACTIONS_COLUMN_WIDTH = 150;
6463 NgxDatatableListDirective ,
6564 PermissionDirective ,
6665 LocalizationModule ,
66+ UtcToLocalPipe ,
6767 AsyncPipe ,
6868 NgTemplateOutlet ,
6969 NgComponentOutlet ,
@@ -77,6 +77,7 @@ export class ExtensibleTableComponent<R = any> implements OnChanges, AfterViewIn
7777 protected readonly cdr = inject ( ChangeDetectorRef ) ;
7878 protected readonly locale = inject ( LOCALE_ID ) ;
7979 protected readonly config = inject ( ConfigStateService ) ;
80+ protected readonly timeZoneService = inject ( TimezoneService ) ;
8081 protected readonly entityPropTypeClasses = inject ( ENTITY_PROP_TYPE_CLASSES ) ;
8182 protected readonly permissionService = inject ( PermissionService ) ;
8283
@@ -134,10 +135,6 @@ export class ExtensibleTableComponent<R = any> implements OnChanges, AfterViewIn
134135 ( this . columnWidths as any ) = widths ;
135136 }
136137
137- private getDate ( value : Date | undefined , format : string | undefined ) {
138- return value && format ? formatDate ( value , format , this . locale ) : '' ;
139- }
140-
141138 private getIcon ( value : boolean ) {
142139 return value
143140 ? '<div class="text-success"><i class="fa fa-check" aria-hidden="true"></i></div>'
@@ -156,12 +153,6 @@ export class ExtensibleTableComponent<R = any> implements OnChanges, AfterViewIn
156153 switch ( prop . type ) {
157154 case ePropType . Boolean :
158155 return this . getIcon ( value ) ;
159- case ePropType . Date :
160- return this . getDate ( value , getShortDateFormat ( this . config ) ) ;
161- case ePropType . Time :
162- return this . getDate ( value , getShortTimeFormat ( this . config ) ) ;
163- case ePropType . DateTime :
164- return this . getDate ( value , getShortDateShortTimeFormat ( this . config ) ) ;
165156 case ePropType . Enum :
166157 return this . getEnum ( value , prop . enumList || [ ] ) ;
167158 default :
0 commit comments