mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
default date format setting changes as we now using new calendar
This commit is contained in:
-20
@@ -23,7 +23,6 @@ import { CardViewUpdateService } from '../../services/card-view-update.service';
|
||||
import { CardViewDateItemComponent } from './card-view-dateitem.component';
|
||||
import { CoreTestingModule } from '../../../testing/core.testing.module';
|
||||
import { ClipboardService } from '../../../clipboard/clipboard.service';
|
||||
import { CardViewDatetimeItemModel } from '../../models/card-view-datetimeitem.model';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
import { AppConfigService } from '@alfresco/adf-core';
|
||||
|
||||
@@ -354,23 +353,4 @@ describe('CardViewDateItemComponent', () => {
|
||||
expect(valueChips[1].nativeElement.innerText.trim()).toBe('Jul 11, 2017');
|
||||
expect(valueChips[2].nativeElement.innerText.trim()).toBe('Jul 12, 2017');
|
||||
});
|
||||
|
||||
it('should render chips for multivalue datetimes when chips are enabled', async () => {
|
||||
component.property = new CardViewDatetimeItemModel({
|
||||
label: 'Text label',
|
||||
value: ['Jul 10 2017 00:01:00', 'Jul 11 2017 00:01:00', 'Jul 12 2017 00:01:00'],
|
||||
key: 'textkey',
|
||||
editable: true,
|
||||
multivalued: true
|
||||
});
|
||||
|
||||
fixture.detectChanges();
|
||||
await fixture.whenStable();
|
||||
const valueChips = fixture.debugElement.queryAll(By.css(`mat-chip`));
|
||||
expect(valueChips).not.toBeNull();
|
||||
expect(valueChips.length).toBe(3);
|
||||
expect(valueChips[0].nativeElement.innerText.trim()).toBe('Jul 10, 2017, 0:01');
|
||||
expect(valueChips[1].nativeElement.innerText.trim()).toBe('Jul 11, 2017, 0:01');
|
||||
expect(valueChips[2].nativeElement.innerText.trim()).toBe('Jul 12, 2017, 0:01');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -22,7 +22,7 @@ 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';
|
||||
format: string = 'MMM d, y';
|
||||
|
||||
constructor(cardViewDateItemProperties: CardViewDateItemProperties) {
|
||||
super(cardViewDateItemProperties);
|
||||
|
||||
Reference in New Issue
Block a user