View Full Version : [B2] GridFilters DateFilter bug

13 Apr 2011, 4:11 AM

Not sure if the examples/ux folder is meant to be supported but thought would report an issue we've found anyway.

Firstly probably worth highlighting that having the ux folder under examples seems a bit odd, should probably be a level up, or under src perhaps.
Secondly, surprised that something so key as grid filters has still not made it into the core framework...

Anyone, onto the issue.
The problem is in getSerialArgs, and an issue with date formatting.

I've noticed in other areas that the format function seems to be missing for dates now, but anyway, the fix is the new bit for value here:

* @private
* Template method that is to get and return serialized filter data for
* transmission to the server.
* @return {Object/Array} An object or collection of objects containing
* key value pairs representing the current configuration of the filter.
getSerialArgs : function () {
var args = [];
for (var key in this.fields) {
type: 'date',
comparison: this.compareMap[key],
value: Ext.util.Format.date(this.getFieldValue(key), this.dateFormat) //this.getFieldValue(key).format(this.dateFormat)
return args;