I can't seem to get date range filtering to work.
This is what I've tried separately, so far:
I'm using SmartGWT 2.0, and I know new constructors were added in AdvanceCriterions, but doing things this way should be okay, right?
I also tried creating two DateItems, one "From" and one "To", linked it to the same field via "setCriteriaField" and that didn't work either.
Can someone please point me to an working example of client-side date range filtering?
I've seen the (and applied) the date range filtering in the SmartClient Explorer, but to no avail.
This is what I've tried separately, so far:
Code:
AdvancedCriteria filterAC = new AdvancedCriteria(JSON.decode( "{" + " _constructor:\"AdvancedCriteria\"," + " operator:\"and\"," + " criteria:" + " [{" + // " fieldType:\"date\"," + " fieldName:\"DATE_TIME\"," + " operator:\"betweenInclusive\"," + " start:\"Date(99,0,0,0,0,0)\"," + " end:\"Date()\"" + " }]" + "}" ));
Code:
DateItem gpsTimeFromItem = new DateItem("DATE_TIME", "From"); gpsTimeFromItem.setDefaultValue(new Date(110, 3, 10)); gpsTimeFromItem.setOperator(OperatorId.LESS_OR_EQUAL); // gpsTimeFromItem.setCriteriaField("DATE_TIME");
Can someone please point me to an working example of client-side date range filtering?
I've seen the (and applied) the date range filtering in the SmartClient Explorer, but to no avail.
Comment