From 736d57cc2efe3dc17bc4a2cc4afe8ac2241b5190 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Wed, 2 Nov 2016 14:04:30 +0000 Subject: [PATCH] #971 validate and edit only editable date columns --- .../src/components/widgets/core/dynamic-table.model.ts | 2 +- .../widgets/dynamic-table/editors/date/date.editor.html | 2 +- .../widgets/dynamic-table/editors/date/date.editor.spec.ts | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/core/dynamic-table.model.ts b/ng2-components/ng2-activiti-form/src/components/widgets/core/dynamic-table.model.ts index 3501a31f08..ccdfcf4508 100644 --- a/ng2-components/ng2-activiti-form/src/components/widgets/core/dynamic-table.model.ts +++ b/ng2-components/ng2-activiti-form/src/components/widgets/core/dynamic-table.model.ts @@ -216,7 +216,7 @@ export class DateCellValidator implements CellValidator { ]; isSupported(column: DynamicTableColumn): boolean { - return column && this.supportedTypes.indexOf(column.type) > -1; + return column && column.editable && this.supportedTypes.indexOf(column.type) > -1; } validate(row: DynamicTableRow, column: DynamicTableColumn, summary?: DynamicRowValidationSummary): boolean { diff --git a/ng2-components/ng2-activiti-form/src/components/widgets/dynamic-table/editors/date/date.editor.html b/ng2-components/ng2-activiti-form/src/components/widgets/dynamic-table/editors/date/date.editor.html index e23712a62d..982a5e67bc 100644 --- a/ng2-components/ng2-activiti-form/src/components/widgets/dynamic-table/editors/date/date.editor.html +++ b/ng2-components/ng2-activiti-form/src/components/widgets/dynamic-table/editors/date/date.editor.html @@ -13,7 +13,7 @@ -
+