Ext.ns('Nexts.grid', 'Nexts.grid.filter'); 

Nexts.grid.filter.DateFilter = Ext.extend(Ext.ux.grid.filter.DateFilter, {
	/** override **/
	dateFormat: Ext.DatePicker.prototype.format,

	/** override **/
    getSerialArgs : function () {
		var args = {};
		if (this.dates.before.checked && this.dates.after.checked) {
			args = { 
				c: 'bt', 
				dv: this.getFieldValue('after').format(this.dateFormat),
				dv2: this.getFieldValue('before').format(this.dateFormat)
			};
		}
		else if (this.dates.after.checked) {
			args = { 
				c: 'ge', 
				dv: this.getFieldValue('after').format(this.dateFormat)
			};
		}
		else if (this.dates.before.checked) {
			args = { 
				c: 'le', 
				dv: this.getFieldValue('before').format(this.dateFormat)
			};
		}
		else if (this.dates.on.checked) {
			args = { 
				c: 'eq', 
				dv: this.getFieldValue('on').format(this.dateFormat)
			};
		}
	
		return args;
	}
});

