I have a timestamp returned like this:
Fri Jun 30 2017 09:57:18 GMT+0100 (BST)
and I formatted it to look like this : Jun 30, Fri 2017 09:57
When it is sorted in the Griddle it is sorted alphabetically (apr,aug,dec,feb,jan,jul,jun,mar,may,nov,oct,sep) as it should but I really want to have them sorted according to months.
sortType: 'date' in metacolumns does not work.
return (<Griddle results={lRowData}
columns={this.columns()}
columnMetadata={this.columnMetadata()}
initialSort="date"
resultsPerPage={20}/>
);
},
columns() {
const lColumns = ['date'];
return lColumns;
},
columnMetadata() {
const lColumnMetadata = [{
columnName: 'date',
displayName: 'Date'
}];
return lColumnMetadata;
}
Is there a way to use some kind of indexed table like:
allMonths = ['Jan' , 'Feb', 'Mar', 'Apr', 'May',...., 'Dec']
where will be the one that helps on sorting them ?