This is a migrated thread and some comments may be shown as answers.

DatePicker doesn't open in ionic modal

1 Answer 794 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Vinicius
Top achievements
Rank 1
Vinicius asked on 29 May 2020, 12:43 PM

Hi, I have an DatePicker in an ionic modal. 

But for some reason it doesn't open and gives no errors in cosole. It is just a copy and paste from the basic example in the docs.

That is any reason for this to happen?

1 Answer, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 02 Jun 2020, 08:23 AM

Hi Vinicius,

I am not sure what is the default behavior of the Ionic modal, but it should be causing the reported behavior.

In general, whenever the DatePicker is focused it adds its popup to the root level within the DOM. It is possible that the Ionic modal doesn't allow to focus an item that is rendered outside the DOM of the modal. What could be done in such cases is to use the appendTo property of the DatePicker popupSettings to render the popup within the DOM of the modal. Please check the following issue on a similar case, where the DatePicker is used inside a Bootstrap modal, and see the suggested usage of the popupSettings.appendTo property:

https://github.com/telerik/kendo-angular/issues/1984#issuecomment-447779522

Another option would be to use the Kendo Dialog:

https://stackblitz.com/edit/angular-mnjh6g?file=app/app.component.ts

I hope the provided information helps. Feel free to write back in case any further assistance is required for this case. Thank you.

Regards,
Svetlin
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
DatePicker
Asked by
Vinicius
Top achievements
Rank 1
Answers by
Svet
Telerik team
Share this question
or