Author Topic: Filter Date Field In Header Row  (Read 2600 times)

cijojohn

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 73
    • View Profile
Filter Date Field In Header Row
« 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

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6265
    • View Profile
Re: Filter Date Field In Header Row
« Reply #1 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

cijojohn

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 73
    • View Profile
Re: Filter Date Field In Header Row
« Reply #2 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'] }
      },

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6265
    • View Profile
Re: Filter Date Field In Header Row
« Reply #3 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'] }