Hi,
I added ngbdatepicker in ag grid cell. Unfortunately the calendar is coming inside the cell. Here is my code.
Hi,
I added ngbdatepicker in ag grid cell. Unfortunately the calendar is coming inside the cell. Here is my code.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
manikandan rPosted Jan 29, 2024, 2:22 PM
this is not working
Jayraj ChhayaPosted Jan 29, 2024, 7:39 AM
To render the NgbDatepicker calendar outside the Ag Grid cell, we need to modify the code structure. Here's an example of how you can achieve this:
In this example, we define a template named "datePickerTemplate" that contains the input element and the NgbDatepicker component. We then use this template in the Ag Grid column definition by setting the "cellRendererFramework" property to a custom cell renderer component called "DateCellRenderer".
The "DateCellRenderer" component will render the "datePickerTemplate" for each cell in the "Date" column. This way, the NgbDatepicker calendar will be rendered outside the cell, providing a better user experience.