NgbDatepicker: How to provide a ContentTemplate when using the datepicker in a popup?

Viewed 389

I' am using a NgbDatepicker in a popup and I would like to apply a custom Content Template as shown in this example: https://ng-bootstrap.github.io/#/components/datepicker/examples#custommonth

But I fail to do so: To use the datepicker in a popup I have to apply the NgbInputDatepicker directive to an input. But I don't see a way to connect a <ng-template ngbDatepickerContent> with said input. I also can't access the state of NgbDatepicker through the NgbInputDatepicker, which limits me in customizing the content.

Is it possible to use the NgbDatepicker in a popup with a custom Content Template? How would I provide the template to the NgbInputDatepicker and would I access the actual NgbDatepicker?

I forked and modified the example form the ng-boostrap project to better illustrate my problem: https://stackblitz.com/edit/angular-b43ppy?file=src%2Fapp%2Fdatepicker-popup.html

0 Answers
Related