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. Image for the cookie policy date
close icon

How to implement filtering for null / blank dates?

Looking at the following demo, all of the orders have a date assigned to it.
     https://ej2.syncfusion.com/aspnetmvc/Grid/FilterMenu#/material

With the following demo grid:
@(Html.EJS().Grid<PersonVm>("PersonGrid")
          .DataSource(ds => { ds.Url(Url.Action("LoadRecords")).UpdateUrl(Url.Action("Edit")).InsertUrl(Url.Action("Create")).Adaptor("UrlAdaptor"); }) 
          .EditSettings(edit => { edit.AllowAdding(true).AllowEditing(true).ShowDeleteConfirmDialog(true).Mode(EditMode.Dialog); })
          .AllowFiltering().FilterSettings(filter => { filter.Type(FilterType.Menu); })
          .Columns(col => {
              col.Field(p => p.Id).IsPrimaryKey(true).IsIdentity(true).Type("number").Format("N0").Add();
              col.Field("Prefix").HeaderText("Prefix").Type("string").Add();
              col.Field("FirstName").HeaderText("First tName").Type("string").Add();
              col.Field("LastName").HeaderText("Last Name").Type("string").Add();
              col.Field("Suffix").HeaderText("Suffix").Add();
              col.Field("PhoneNumber").HeaderText("Phone Number").Type("string").ValueAccessor("formatPhoneNumber").Add();
              col.Field("Birthday").HeaderText("Birthday").Type("date").Format("yMd").Add();
          })
          .Render()
    )

the filter for "Birthday" shows up correctly as a dateedit. However in my demo it's a nullable field and a user may want to search for any records that don't have a date assigned yet. I'm sure there's a way to do it with a custom filter, but cannot seem to work it out. Any assistance you can provide would be appreciated.

Thank you,
Rich Werning

6 Replies

TS Thavasianand Sankaranarayanan Syncfusion Team March 26, 2019 11:05 AM UTC

Hi Richard, 

Greetings from Syncfusion. 

We have validated the defect Grid menu filter does not filter the null date values properly you have initiated with us. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and the defect fix will be included in our April 10th, 2019 patch release. 
  
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  
 

Note: The above mentioned feedback portal is under review and it will be visible once feedback reviewed.  

Until then we appreciate your patience. 

Regards, 
Thavasianand S. 



RW Richard Werning March 26, 2019 12:45 PM UTC

Thank you for the response, looking forward to the update.  When I follow that link I get a 404 Page not found error.


TS Thavasianand Sankaranarayanan Syncfusion Team March 27, 2019 09:15 AM UTC

Hi Richard, 

Thanks for your patience. 

Feedback portal got reviewed so now you can able to see the feedback portal page.  

Regards, 
Thavasianand S. 



RW Richard Werning March 27, 2019 09:45 AM UTC

Still doesn't work, when i click your link above i get a 404 wiree


TS Thavasianand Sankaranarayanan Syncfusion Team March 28, 2019 10:54 AM UTC

Hi Richard, 

The mentioned feedback portal will be visible when you are login to that page and also created feedback portal is a private one. So, please login into that page.  

Regards, 
Thavasianand S. 



TS Thavasianand Sankaranarayanan Syncfusion Team April 24, 2019 11:37 AM UTC

Hi Richard, 
 
Thanks for your patience. 
We are glad to announce that our Essential JavaScript 2 patch release (17.1.40) has been rolled out successfully and in that release, we have added the fix for an issue “Grid menu filter does not filter the null date values properly”. 
 
Regards, 
Thavasianand S. 


Loader.
Live Chat Icon For mobile
Up arrow icon