I have a smart table and I try to sort the table by Start Date(column). It is working but it is just sorting data by day and not all the date. This means it is only comparing between the day of the different dates and not all the date (month and year). I'm thinking of using a function here but what option do need to use?CompareFunction maybe? And how i can say the first click ascendant and the second is descendant?
startDate: {
title: this.applyTransalte("StartDate"),
type: 'date',
valuePrepareFunction: (startDate) => {
return this.datepipe.transform(startDate, 'dd/MM/yyyy');
},
},
Use yyyy/MM/dd instead because comparing is done alphabetically