diff --git a/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.html b/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.html
index 3f3de32799..64352cf433 100644
--- a/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.html
+++ b/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.html
@@ -9,8 +9,9 @@
[id]="column.id"
[required]="column.required"
[disabled]="!column.editable"
- (focusout)="onDateChanged($event.srcElement.value)">
+ (focusout)="onDateChanged($event.srcElement.value)"
+ (dateChange)="onDateChanged($event)">
-
+
diff --git a/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.spec.ts b/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.spec.ts
index 642b69edf3..2ba854b5c5 100644
--- a/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.spec.ts
+++ b/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.spec.ts
@@ -67,7 +67,7 @@ describe('DateEditorComponent', () => {
});
it('should update row value upon user input', () => {
- const input = '14-03-2016';
+ const input = {value: '14-03-2016' };
component.ngOnInit();
component.onDateChanged(input);
@@ -78,7 +78,7 @@ describe('DateEditorComponent', () => {
it('should flush value on user input', () => {
spyOn(table, 'flushValue').and.callThrough();
- const input = '14-03-2016';
+ const input = {value: '14-03-2016' };
component.ngOnInit();
component.onDateChanged(input);
diff --git a/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.ts b/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.ts
index b217615e5d..97c3443e36 100644
--- a/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.ts
+++ b/lib/core/form/components/widgets/dynamic-table/editors/date/date.editor.ts
@@ -65,12 +65,12 @@ export class DateEditorComponent implements OnInit {
let momentDateAdapter = this.dateAdapter;
momentDateAdapter.overrideDisplyaFormat = this.DATE_FORMAT;
- this.value = moment(this.table.getCellValue(this.row, this.column), this.DATE_FORMAT);
+ this.value = moment(this.table.getCellValue(this.row, this.column), 'YYYY-MM-DD');
}
onDateChanged(newDateValue) {
- if (newDateValue) {
- let momentDate = moment(newDateValue, this.DATE_FORMAT, true);
+ if (newDateValue && newDateValue.value) {
+ let momentDate = moment(newDateValue.value, this.DATE_FORMAT, true);
if (!momentDate.isValid()) {
this.row.value[this.column.id] = '';
diff --git a/lib/core/form/components/widgets/dynamic-table/editors/dropdown/dropdown.editor.html b/lib/core/form/components/widgets/dynamic-table/editors/dropdown/dropdown.editor.html
index f8c2883f30..12d0aaf91b 100644
--- a/lib/core/form/components/widgets/dynamic-table/editors/dropdown/dropdown.editor.html
+++ b/lib/core/form/components/widgets/dynamic-table/editors/dropdown/dropdown.editor.html
@@ -8,7 +8,7 @@
[(ngModel)]="value"
[required]="column.required"
[disabled]="!column.editable"
- (change)="onValueChanged(row, column, $event)">
+ (selectionChange)="onValueChanged(row, column, $event)">
{{opt.name}}