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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Filter with date range

Thread ID:





144081 Apr 17,2019 12:14 PM UTC Apr 24,2019 10:50 AM UTC Angular - EJ 2 5
Tags: Grid
Fabiano Melo
Asked On April 17, 2019 12:14 PM UTC


Using the example below in stackblitz, how do I just leave the datapicker, hiding the combobox with the options (equal, greater than, greater than or equal, ...).


Another doubt, this example is with local data, right! In the case of using serve-side data, do I have to make any changes with respect to the filter, or just loaded my data into the grid as per my API return, as I'm already doing?

Ravi Kumar
Replied On April 18, 2019 11:34 AM UTC

New filter:
app.filter("myfilter", function($filter) {
return function(items, from, to, dateField) {
startDate = moment(from);
endDate = moment(to);
return $filter('filter')(items, function(elem) {
var date = moment(elem[dateField]);
return date >= startDate && date <= endDate;
Hope this code will help you. If you want more enhance your skills then you can go for Angular Course.

Fabiano Melo
Replied On April 18, 2019 01:18 PM UTC


I believe you have not understood my question. And I do not think he looked at the example in the Stackblitz that I posted (https://stackblitz.com/edit/grid-range-date). Your interpretation of my question was not satisfactory! Must improve!

What I need is to just show the datapicker and hide the combobox in the menu type filter in the grid component of syncfusion.

With respect to the angular course, I do not think I need it! For my doubt has no respect to Angular, but to the requirements of the syncfusion tool. That is, the question was only if, in the case of using serve-side data consumption, there is some difference in the filter parameters of the syncfusion grid component! Or does it remain as it is?

Thank you for the attention EXCELLENT service!

Kuralarasan Muthusamy [Syncfusion]
Replied On April 19, 2019 01:31 PM UTC

Hi Fabiano, 

Thanks for contacting Syncfusion support. 

From your query, we found that you want to hide the dropDownList from the Grid Menu filter dialog. You can achieve this requirement by simply adding the hidden property to the dropDownList element, after filter dialog will be opened. In the below code we have added the hidden property to the dropDownList by using actionComplete event of the Grid. 

        if (args.requestType == "filterafteropen" && args.columnName == "projects_StartDate") 
            args.filterModel.dlgObj.element.querySelector('.e-flm_optrdiv').hidden = true; 

We have modified your sample with this code and you can find that modified sample in the below link, 

Kuralarasan M 

Fabiano Melo
Replied On April 22, 2019 06:38 PM UTC

Thanks for the feedback.

I was able to do it the following way, but I will do as I said.


Thavasianand Sankaranarayanan [Syncfusion]
Replied On April 24, 2019 10:50 AM UTC

Hi Fabiano, 
We are happy that the problem has been solved. 
Please get back to us if you need any further assistance.  
Thavasianand S.


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

Live Chat Icon For mobile
Live Chat Icon