Good day, i´m using version 3.x of extjs, and i like to know if i can add button to tbar and handle a date comparision?, in the version I have published there is already a column filters with the date comparision as you see in the image . but the need is to launch the same filter from the top bar
filter.png
the current console log for the selected options are
filter2.png
the code to correspont that is
Code:
RestultGrid.filters = new Ext.ux.grid.GridFilters({filters:
[
{type: 'date', dataIndex: 'fecha_generacion'},
{type: 'string', dataIndex: 'other filters .... etc'},
]
});
RestultGrid.grid = new Ext.grid.GridPanel({
width:960,
height:640,
store: RestultGrid.store,
plugins:RestultGrid.filters,
trackMouseOver:false,
disableSelection:true,
loadMask: true,
columns:[
{
// all the other columns etc....
}
,{
id: 'fecha_generacion',
header: "Fecha Generación",
dataIndex: 'fecha_generacion',
align: 'left',
width: 140,
sortable: true
}
],
viewConfig: {
forceFit:true
},
tbar : [
{
text:'Filter by Date',
iconCls: 'icon-refresh',
handler : function(){
// call here the datepicker
}
}]
});
Many Thanks in advance