ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: JUNZHONG on April 07, 2016, 11:17:10 pm
-
Hi,
We have date filter on the grid as -
{ title: "Next Cal", width: 165, dataType: "date", dataIndx: "NEXT_CAL",
render: function (ui) {if (ui.cellData == null) return null; else return $.datepicker.formatDate('mm/dd/yy', new Date(Date.parseExact(ui.cellData,'d-MMM-yyyy')));},
filter: { type: 'textbox', condition: "between", init: pqDatePicker, listeners: ['change'] }
},
This field allows null so we have few records with empty/null date.
When we filter with end date, the row with null date shows up too. It should not show up. Please help.
-
This example http://paramquery.com/pro/demos/filter_header_local has empty values "" in the Shipped Date column.
It works fine, you can check by copying the between filter from Order date column to Shipped data column.
You might have to replace null values with ""
-
I tried with "" empty date but still doesn't work for me. Your example work but not my code. Seems like it is getting converted to date "12/31/1969". Not sure why. We are using 2.2 version.
filterModel: { header: true, type: 'local' }
-
It also works fine in v2.4
http://paramquery.com/pro/demos24/filter_header_local
Could you please share a jsfiddle.
-
I found the issue. I was using date.js which was causing all the issues.
Thanks for your help.