We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Filtering date js

Thread ID:





119469 Jun 25,2015 02:25 PM UTC Jun 26,2015 11:48 AM UTC ASP.NET MVC 1
Tags: Grid
Asked On June 25, 2015 02:25 PM UTC


We need filter grid in side client but we can to do run.

We have a Hierarchy Grid and we try apply filter:

function filterDate(btnStatus)
        //filterGrid("FechaPrevista", "28/06/2015", btnStatus.isChecked, ej.FilterOperators.greaterThan);

        $.each(gridsChild, function (s, e) {
            var gridId = "#" + e;
            var gridObj = $(gridId).data("ejGrid");
            gridObj.model.filterSettings.filteredColumns = [];

            var date = new Date(2015, 06, 15, 0, 0, 0, 0);
            //var dateDouble = date.getTime();
            gridObj.filterColumn("FechaPrevista", ej.FilterOperators.greaterThan, date, "or");


But never filter date... i attach project sample.


Attachment: TestSyncFusion_511fd772.zip

Ajith R [Syncfusion]
Replied On June 26, 2015 11:48 AM UTC

Hi David,

Thanks for using Syncfusion products.

Query: We need filter grid in side client but we can to do run. But never filter date

We have analyzed your code snippet and found that you have not set the match case parameter value in the filterColumn function which is the cause of the issue. When the filterColumn function doesn’t have the match case parameter for filtering date type column, it will compare the date value as string and return the result based on the string value. So we suggest you to set the match case as true in the filterColumn function to resolve the issue.

Please refer the below code snippet for further details.

function filterDate(btnStatus)


        $.each(gridsChild, function (s, e) {



            var date = new Date(2015, 06, 15, 0, 0, 0, 0);           

            gridObj.filterColumn("FechaPrevista", ej.FilterOperators.greaterThan, date, "and", true);           



Note: Since you have set month value as 06 in the Date object, its corresponding month is July from javascript Date object and the filter result will show “No records to display” as per your records in the Grid.

Please refer the below link to know further  details about month in javascript object.


For your convenience we have modified your sample and the same can be downloaded from the below link.

Sample Link: http://www.syncfusion.com/downloads/support/forum/119469/ze/TestSyncFusion-520701269

Please let us know if you have any concerns.

Ajith R


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon