[HXCS-2818] CardViewDateItem component ignore timezone when displaying dates (#9304)

* [HXCS-2818] card-view-dateitem interpret dates as local, store them as utc

* [HXCS-2818] refactoring

---------

Co-authored-by: Adriano Costa <Adriano.Costa@hyland.comgit>
This commit is contained in:
Adriano Costa
2024-02-05 16:52:27 +01:00
committed by GitHub
parent 47d1165d5f
commit efd8e8d0ed
4 changed files with 37 additions and 25 deletions

View File

@@ -114,17 +114,17 @@ export class CardViewComponent implements OnInit, OnDestroy {
}),
new CardViewDateItemModel({
label: 'CardView Date Item',
value: new Date(1983, 11, 24, 10, 0, 30),
value: new Date('1983-11-24T00:00:00Z'),
key: 'date',
default: new Date(1983, 11, 24, 10, 0, 30),
default: new Date('1983-11-24T00:00:00Z'),
format: 'shortDate',
editable: this.isEditable
}),
new CardViewDateItemModel({
label: 'CardView Date Item - Multivalue (chips)',
value: [new Date(1983, 11, 24, 10, 0, 30)],
value: [new Date('1983-11-24T00:00:00Z')],
key: 'date',
default: new Date(1983, 11, 24, 10, 0, 30),
default: new Date('1983-11-24T00:00:00Z'),
format: 'shortDate',
editable: this.isEditable,
multivalued: true