Hello,
What is the simplest way to format a date column to show ‘MM/DD/YYYY’?
What I tried:
columns: [
...
{ label: 'Start Date', dataField: 'startDate', formatSettings: { dateFormat: 'MM/DD/YYYY' }, width: 150 },
{ label: 'End Date', dataField: 'endDate', formatSettings: { dateFormat: 'MM/DD/YYYY' }, width: 100 },
...
];
new Smart.DataAdapter({
...,
dataFields: [
...
{ name: 'startDate', dataType: 'date' },
{ name: 'endDate', dataType: 'date' },
...
]
});
When I pass a date object, regardless of the format specified above, it still defaults to the long date format such as Mon Nov 01 2021 …
I’m using Angular by the way.