下面是参考代码。 如果我选择日期为02/11/2019,则表将更新并显示为01/11/2019和02/11/2019的记录。请提出建议。
enter code here
var dDateStart = oEvent.getSource().getProperty('dateValue');
var dDateEnd = new Date(dDateStart + 1);
dDateStart.setMilliseconds(0);
dDateStart.setSeconds(0);
dDateStart.setMinutes(0);
dDateStart.setHours(0);
dDateEnd.setMilliseconds(0);
dDateEnd.setSeconds(59);
dDateEnd.setMinutes(59);
dDateEnd.setHours(23);
aFilters=[
new sap.ui.model.Filter("CrDate", sap.ui.model.FilterOperator.BT, dDateStart, dDateEnd)];
var oFilter = new sap.ui.model.Filter({
filters: aFilters,
and: true });
this.getView().byId("idCoTable").getBinding("items").filter(oFilter,true);