mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
[AAE-898] Fix Datetime card view model custom format (#5265)
* [AAE-898] Fix Datetime card view model custom format * Fix e2e tests and rebase
This commit is contained in:
parent
b016bf8167
commit
db55cdf997
@ -271,7 +271,7 @@ describe('CardView Component', () => {
|
||||
|
||||
it('[C279962] Should be present a default value', async () => {
|
||||
await expect(await metadataViewPage.getPropertyText('date', 'date')).toEqual('12/24/83');
|
||||
await expect(await metadataViewPage.getPropertyText('datetime', 'datetime')).toEqual('Dec 24, 1983, 10:00');
|
||||
await expect(await metadataViewPage.getPropertyText('datetime', 'datetime')).toEqual('12/24/83, 10:00 AM');
|
||||
});
|
||||
|
||||
it('[C312447] Should be able to clear the date field', async () => {
|
||||
|
@ -18,8 +18,17 @@
|
||||
import { CardViewItem } from '../interfaces/card-view-item.interface';
|
||||
import { DynamicComponentModel } from '../../services/dynamic-component-mapper.service';
|
||||
import { CardViewDateItemModel } from './card-view-dateitem.model';
|
||||
import { CardViewDateItemProperties } from '../interfaces/card-view.interfaces';
|
||||
|
||||
export class CardViewDatetimeItemModel extends CardViewDateItemModel implements CardViewItem, DynamicComponentModel {
|
||||
type: string = 'datetime';
|
||||
format: string = 'MMM d, y, H:mm';
|
||||
|
||||
constructor(cardViewDateItemProperties: CardViewDateItemProperties) {
|
||||
super(cardViewDateItemProperties);
|
||||
|
||||
if (cardViewDateItemProperties.format) {
|
||||
this.format = cardViewDateItemProperties.format;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user