mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-01 14:41:32 +00:00
Merge pull request #1004 from Alfresco/dev-denys-944
fix date formatting for completed forms
This commit is contained in:
@@ -624,7 +624,7 @@ describe('DisplayValueWidget', () => {
|
||||
let row = <DynamicTableRow> { value: { key: value } };
|
||||
let column = <DynamicTableColumn> { id: 'key', type: 'Date' };
|
||||
|
||||
expect(widget.getCellValue(row, column)).toBe('04-10-2016');
|
||||
expect(widget.getCellValue(row, column)).toBe('4-10-2016');
|
||||
});
|
||||
|
||||
it('should fallback to empty cell value for date', () => {
|
||||
|
@@ -176,7 +176,7 @@ export class DisplayValueWidget extends WidgetComponent implements OnInit {
|
||||
|
||||
if (column.type === 'Date') {
|
||||
if (result) {
|
||||
return moment(result.split('T')[0], 'YYYY-MM-DD').format('DD-MM-YYYY');
|
||||
return moment(result.split('T')[0], 'YYYY-MM-DD').format('D-M-YYYY');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user