How can I get custom GridColumnMenuFilter to stay open when selecting dates from non-Kendo DatePicker

1 Answer 46 Views
DatePicker Filter  Grid
Dehn
Top achievements
Rank 1
Dehn asked on 22 Mar 2022, 01:35 PM
Our app uses a custom date picker that is not from Kendo (better matched the UI our designers were going for). When I try to create a custom filter menu I can get the menu and then the calendar to open. When I go to select a date I think the filter menu see that as a click outside of menu and it closes.

Also suspect part of the issue is that the date picker uses moment to format dates so there could be a possible mismatch there, although I think I have done what I can to convert this format as needed.

1 Answer, 1 is accepted

Sort by
0
Filip
Telerik team
answered on 24 Mar 2022, 09:43 AM

Hello, Dehn,

Thank you for reaching out to us. Is it possible for you to create a working example with your datepicker that reproduces this behavior so that we can test and inspect it further? 

Currently keeping the GridColumnMenuFilter open without closing when clicking outside is not supported, however, we will do our best to inspect this behavior once we have a reproducible example and can be able to suggest a possible approach.

Regards, FilipProgress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Dehn
Top achievements
Rank 1
commented on 31 Mar 2022, 03:34 PM

Hello, 
Just go back to looking into this. If we have to use the default menu for now that would probably be ok.

Here is a very simplified, and not very pretty demo https://react-xewppr.stackblitz.io and a video of the test components in our code that is a little more complete https://www.screencast.com/t/ByYZUwmG .

In our version we use two of the date-pickers and some materialUI select elements to handle the "before, after, and, or, equal to" part of the filter.

Thanks! 

Dehn

Filip
Telerik team
commented on 04 Apr 2022, 08:46 AM

Hello,

Thank you for providing a working example and a video. Since the example is a live demo I was not able to inspect the code. Is it possible for you to send a stackblitz that contains the relevant code as well?  
Dehn
Top achievements
Rank 1
commented on 04 Apr 2022, 12:24 PM | edited

Oop sorry haven't used stackblitz much yet. https://stackblitz.com/edit/react-xewppr?file=src/App.js 
Filip
Telerik team
commented on 06 Apr 2022, 08:15 AM

Hi, Dehn,

We inspected the provided code and came up with the following solution:

https://stackblitz.com/edit/react-25hnrq?file=src/App.js

The main idea is to target the picker wrapper by ID, stop the propagation, preventDefault and then focus the k-grid-columnmenu-popup using the onBlur event.

I hope this helps.

Regards,
Filip

 

Tags
DatePicker Filter  Grid
Asked by
Dehn
Top achievements
Rank 1
Answers by
Filip
Telerik team
Share this question
or