Wrong Date predicate in filter

Hi,

I have a date selector placed in the grid filter to select due date.





 
   
                   format='dd/MM/yyyy'
                   (change)=onChangeDueDateFilter($event)
                   floatLabelType="Auto">
   
 
 

When the date is selected the grid API is called to trigger the filtering

public onChangeDueDateFilter(args: ChangedEventArgs) {

  //console.log(args);

  if (args && args.value) {

    this.grid.filterByColumn('DueDate', 'equal', args.value);

  }

  else {

    this.grid.removeFilteredColsByField('DueDate');

  }

}



However, when I try to debug it I can see that the “greater than” and “less than” is used to fetch the date value entered.



Could somebody advise me how to force the grid to send only one date and not a date range?
Thanks

Regards,
Darryl

3 Replies 1 reply marked as answer

SM Shalini Maragathavel Syncfusion Team December 22, 2020 03:27 PM UTC

Hi Darryl, 

Thanks for contacting Syncfusion support. 

By default in EJ2 Grid when we filter the date column with equal operator, it will be send as greater than and less than operator to compare the date values easily. Since this is the actual behavior of date filtering with equal operator.

 
Screenshot: 
 



Please get back to us if you need further assistance. 

Regards, 
Shalini M. 


Marked as answer

RO RolJan October 6, 2022 10:26 PM UTC

Hello,


I understand the concept, but seems like equal and notequal is not affected by local timezone, but the rest of the operators are - that will cause a lot of issues when working with UTC...


Please let me know if syncfusion somehow makes it simpler?


Best regards.



JC Joseph Christ Nithin Issack Syncfusion Team October 9, 2022 10:19 AM UTC


Hi Roljan,


  Thanks for your update.


  Before proceeding with your query, we would like you to explain your query in detail and if possible share a video or screenshot to explain your query. So that we will be able to proceed further.


Please get back to us for further details.


Regards,

Joseph I.


Loader.
Up arrow icon