ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: Sivakumar on February 19, 2021, 06:55:43 pm
-
Hi,
I have a requirement where I need to have a date filter on the toolbar.
The date filter will open up like a calendar from where I will be able to select FromDate and ToDate locally.
Attached a screenshot to give a picture of the requirement.
Let me know if more input will be required from my end on this.
Thank you.
-
Please take help of API.
https://paramquery.com/pro/api#option-toolbar
https://paramquery.com/pro/api#method-filter
toolbar: {
items: [{
type: 'textbox',
cls: 'od1',
init: function(node){
$(node).datepicker();
}
},
{
type: 'textbox',
cls: 'od2',
init: function(node){
$(node).datepicker();
}
},
{
type: 'button',
label: 'Filter',
listener: function() {
this.filter({
rules:[
{dataIndx:'OrderDate', condition:'between', value: $('.od1').val(), value2: $(".od2").val() }
]
})
}
}
]
}