Currently I have developed a UI5 app that shows a SmartTable with the data coming from the SAP API API_MANAGE_WORKFORCE_TIMESHEET.
What I am trying to do is via the date field TimeSheetDate, however this does not seem to work. When I am trying however to sort any other field numeric or string it appears to work.
Does anyone know why this is happening? Would I require to create a custom column for this to work?
In my controller, I am writing the following code:
onAfterRendering: function () {
var oSmartTable = this.getView().byId("table0");
var oTable = oSmartTable.getTable();
var items = this.getView().byId("table0").getTable().getBinding("items");
console.log(items); // eslint-disable-line no-console /
/table grouping
oTable.getBinding("items").sort(new sap.ui.model.Sorter("TimeSheetDate", true, true));
//oTable.getBinding("items").sort(new sap.ui.model.Sorter("PersonWorkAgreementExternalID", true, true));
Attached are a couple of screenshots highlighting the problem.
Can somebody help me with this issue I am facing?