Skip to Content
avatar image
Former Member

DateRangeSelection

I have a probleme:

<DateRangeSelection

delimiter= "-"

displayFormat="yyyy/MM/dd"

dateValue="{path:'/dateValueDRS1'}"

secondDateValue="{path:'/secondDateValueDRS1'}"

minDate="{path:'/dateMinDRS1'}"

maxDate="{path:'/dateMaxDRS1'}"

change="handleChange"/>

handleChange : function(oEvt){

var filters = [];

var query = oEvt.getParameter("query");

if(query){

var to_dat = new Date(to);

var to_dt = to_dat.toISOString();

var oFilter = new sap.ui.model.Filter("CreatedAt",sap.ui.model.FilterOperator.BT,from_dt,to_dt);

filters.push(oFilter);

var list = this.getView().byId("list");

var oBinding = list.bindAggregation("items");

oBinding.oFilter(filters); } },

SAPUI5

I can not filter a list in a date range.

My list (example of date on my list 05/11/2014)

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Oct 25, 2017 at 06:39 AM

    Hi Thairi,

    can you please check where you have defined from_dt which you have used to filter.

    here i can see only to_dt is defined.

    var to_dt = to_dat.toISOString();

    var oFilter = new sap.ui.model.Filter("CreatedAt",sap.ui.model.FilterOperator.BT,from_dt,to_dt);

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 24, 2017 at 10:24 PM

    Hi ITHRI,

    Could you please open the console in the browser and check if any errors return or not?

    Thanks

    Tri

    Add comment
    10|10000 characters needed characters exceeded