If you work with dates in ag-grid, and you customize your date editor.
ag-grid Out of the box date picker
Let's start all by saying that if you use the out of the box ag-grid date editor, this will use your browser default date picker if you use chrome, otherwise, you can use gridOptions.browserDatePicker = true
browserDatePicker:This is only taking into consideration if there isn’t a date component provided. By default the grid will use the browser date picker in Chrome and a plain text box for all other browsers (this is because Chrome is the only browser providing a decent out of the box date picker). If this property is true, the browser date picker will be used regardless of the browser type.
If you do so, you will have a drop-down date picker provided from your browser, except if you use IE-11 (more on that later)
If you create your own date picker
Note that if you decide to go for a CUSTOM editor, and you want to make it so that is a dropdown, (ie it shows in a popup), this won't be likely to work on the date filter menu, since when you click anywhere in the date popup, it will close it.
This is a known bug, and is tracked in the pipeline with:
|AG-1891||Filters - Add a mechanism for keeping the filter menu open|
If you want to have a custom popup for a date cell editor you can still use a custom editor
We would recommend you this approach and then, for the date component (used in the column filter column) to let ag-grid use its out of the box one.
But I use IE11 and IE doesn't provide date pickers
In this case, we are afraid that for the column menu is going to be very difficult for you to integrate a popup date picker (unless you can stop the click propagation), and then we need to revert to the already mentioned bug AG-1891
Note that we are hoping to have a solution for this soon
Any schedule for fixing "AG-1891Filters - Add a mechanism for keeping the filter menu open" ?
I'm trying to use a custom angular date picker component with ag-grid angular wrapper - I'm providing it we dateComponentFramework option and it is rendered and used but whenever I click anywhere in the date picker the filter component closes - this is really annoying especially when you need to set 2 dates for "inRange" filter.
At this time, we are not in a position to give an official estimate for this issue, but is high in our priority list.
This usually means that you can expect it to be delivered in the next 1-3 releases, or usually 1-4 months.
In the other hand, it might happen that because the circumstances we decide to deprioritise it without further notice, but we try to keep this cases to a minimum.
For now, all we can suggest is to keep monitoring our pipeline to see if there is any updates with your ticket.
It is still in the priority list? I have exactly the same use case.
They merged some fix in for this, but the fix was not working for me because the material datepicker I use gets added to the body in a cdk overlay, and the fix walks up the DOM from the click event looking for a class 'ag-custom-component-popup'.
To make it work, I subscribed to the open event of my datepicker with my IDateAngularComp and I add the necessary class to the container in a timeout, locating the container through a viewchild reference to my datepicker.
Please sign in to leave a comment.