PDA

View Full Version : Store Filter Date Range



pcaviness
1 Feb 2011, 10:21 AM
I'm using a localstorageproxy with a store. One of the columns is a datetime. Is is possible to do a date range filter? All i have seen are "equals" filters.

pcaviness
1 Feb 2011, 11:00 AM
Figured it out:

store.filter(
new Ext.util.Filter({
filterFn: function(record) {
alert(record.data.datetime);
return (record.data.datetime >= startdate &&
record.data.datetime <= enddate
)
}
})
);