ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: cijojohn on April 08, 2017, 05:30:25 am

Title: Filter Date Field In Header Row
Post by: cijojohn on April 08, 2017, 05:30:25 am
For Date filter in Row 0: is it necessary to provide datepicker or it can be a simple text box which can filter the dates. Currently we have used simple text box and its not working.

The customized editor for Date type :

function typeFilterDatepicker() {
   var filter = {
      type : 'textbox',
      condition : "contsu",
      listeners : [ 'keyup' ]
   };
   return filter;
}

Kindly Reply
Title: Re: Filter Date Field In Header Row
Post by: paramvir on April 09, 2017, 09:58:35 pm
yes it works without datepicker.

Just remove/comment the line filter.init = pqDatePicker; in this example:

https://paramquery.com/pro/demos/filter_header_local
Title: Re: Filter Date Field In Header Row
Post by: cijojohn on April 13, 2017, 09:39:17 pm

Hi Team,

I tried with the suggestions and visited the link mentioned https://paramquery.com/pro/demos/filter_header_local

i removed the init and then tried with keyup listener as below  ..its not working

{ title: "Order Date", minWidth: "190", dataIndx: "OrderDate", dataType: "date",
          filter: { type: 'textbox', condition: "begin", listeners: ['keyup'] }
      },


but when i tired with below option it started working. But dataType is not defined then it might cause another problem.. So please tell how to achive the same

{ title: "Order Date", minWidth: "190", dataIndx: "OrderDate",
          filter: { type: 'textbox', condition: "begin", listeners: ['keyup'] }
      },
Title: Re: Filter Date Field In Header Row
Post by: paramvir on April 13, 2017, 11:50:47 pm
condition: begin is not for dates but for string dataType.

If you need to check start date, then use condition: 'gte'

 filter: { type: 'textbox', condition: "gte", listeners: ['change'] }