4

Im trying to incorporate react-date picker with ag-grid ag-grid provides documentation on using custom date picker but with using flatpickr was wondering if anyone has successfully attempted to use react-datepicker with ag-grid and if so, could provide and example?

Ag Grid example: https://www.ag-grid.com/javascript-grid/component-date/

1 Answer 1

6

The react-datepicker is a bit more tricky to work with but I have a solution that works:

The portalId is key here, it allows us to append the popup to the root which allows the popup to be visible inside the filter menu:

<DatePicker portalId="root" popperClassName="ag-custom-component-popup" selected={this.state.date} onChange={this.onChange.bind(this)} /> 

Please see this example

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.