Might be further down the rabbit hole than I want to go.the date-filter has one date-field and a selectbox with = >= <=
which lets you select events ending at the selected date, beginning at the selected date or are running at the selected date.
Its possible to have modified snippet to filter by one field, of course.
For two date-fields, you would need a custom-made filterbox, which do something like that, but with two date-fields and without the listbox:
https://github.com/Bruno17/MIGX/blob/master/core/components/migx/configs/grid/grid.config.inc.php#L217
$gridfilters['date']['code']="
{
xtype: 'compositefield',
width: 300,
items: [
{
xtype: 'modx-combo'
,id: '[[+name]]-migxdb-search-filter'
,name: '[[+name]]'
,hiddenName: '[[+name]]'
,url: '[[+config.connectorUrl]]'
,fields: ['combo_id','combo_name']
,displayField: 'combo_name'
,valueField: 'combo_id'
,pageSize: 0
,value: 'all'
,baseParams: {
action: 'mgr/migxdb/process',
processaction: 'getdatecombo',
configs: '[[+config.configs]]',
searchname: '[[+name]]',
resource_id: '[[+config.resource_id]]'
}
,listeners: {
'select': {
fn: function(tf,nv,ov){
var s = this.getStore();
s.baseParams.[[+name]]_dir = tf.getValue();
this.filter[[+name]](tf,nv,ov);
},
scope: this
}
}
},
{
xtype : 'datefield',
id: '[[+name]]-migxdb-search-filter-date'
,name: '[[+name]]_date'
,format: 'Y-m-d'
,listeners: {
'select': {
fn: function(tf,nv,ov){
var s = this.getStore();
s.baseParams.[[+name]]_date = tf.getValue();
this.filter[[+name]](tf,nv,ov);
},
scope: this
}
}
}
]
}
";
you would need another additional new filter, with two datefields, which I could add to this file for the next coming version.
This is the one, which creates the datefilter with the listbox:
$gridfilters['date']['code']=" { xtype: 'compositefield', width: 300, items: [ { xtype: 'modx-combo' ,id: '[[+name]]-migxdb-search-filter' ,name: '[[+name]]' ,hiddenName: '[[+name]]' ,url: '[[+config.connectorUrl]]' ,fields: ['combo_id','combo_name'] ,displayField: 'combo_name' ,valueField: 'combo_id' ,pageSize: 0 ,value: 'all' ,baseParams: { action: 'mgr/migxdb/process', processaction: 'getdatecombo', configs: '[[+config.configs]]', searchname: '[[+name]]', resource_id: '[[+config.resource_id]]' } ,listeners: { 'select': { fn: function(tf,nv,ov){ var s = this.getStore(); s.baseParams.[[+name]]_dir = tf.getValue(); this.filter[[+name]](tf,nv,ov); }, scope: this } } }, { xtype : 'datefield', id: '[[+name]]-migxdb-search-filter-date' ,name: '[[+name]]_date' ,format: 'Y-m-d' ,listeners: { 'select': { fn: function(tf,nv,ov){ var s = this.getStore(); s.baseParams.[[+name]]_date = tf.getValue(); this.filter[[+name]](tf,nv,ov); }, scope: this } } } ] } ";