mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
This reverts commit 2def8d0557
.
This commit is contained in:
@@ -80,6 +80,23 @@ describe('DateWidgetComponent', () => {
|
||||
expect(widget.maxDate.isSame(expected)).toBeTruthy();
|
||||
});
|
||||
|
||||
it('should eval visibility on date changed', () => {
|
||||
spyOn(widget, 'onFieldChanged').and.callThrough();
|
||||
|
||||
const field = new FormFieldModel(new FormModel(), {
|
||||
id: 'date-field-id',
|
||||
name: 'date-name',
|
||||
value: '9999-9-9',
|
||||
type: 'date',
|
||||
readOnly: 'false'
|
||||
});
|
||||
|
||||
widget.field = field;
|
||||
|
||||
widget.onDateChanged({ value: moment('12/12/2012') });
|
||||
expect(widget.onFieldChanged).toHaveBeenCalledWith(field);
|
||||
});
|
||||
|
||||
describe('template check', () => {
|
||||
|
||||
afterEach(() => {
|
||||
|
@@ -86,5 +86,6 @@ export class DateCloudWidgetComponent extends WidgetComponent implements OnInit,
|
||||
} else {
|
||||
this.field.value = null;
|
||||
}
|
||||
this.onFieldChanged(this.field);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user