remove hardcoded date format (#1779)

This commit is contained in:
Denys Vuika
2017-04-05 11:11:38 +01:00
committed by Mario Romano
parent b5008fd7b1
commit 49dffb8784
@@ -117,7 +117,8 @@ export class DisplayValueWidget extends WidgetComponent implements OnInit {
if (this.value) {
let d = moment(this.value.split('T')[0], 'YYYY-M-D');
if (d.isValid()) {
this.value = d.format('D-M-YYYY');
const displayFormat = originalField['dateDisplayFormat'] || this.field.defaultDateFormat;
this.value = d.format(displayFormat);
}
}
break;