DatePicker doesn't open in ionic modal

2 posts, 0 answers
  1. Vinicius
    Vinicius avatar
    2 posts
    Member since:
    May 2020

    Posted 29 May Link to this post

    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?

  2. Svetlin
    Svetlin avatar
    391 posts

    Posted 02 Jun Link to this post

    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:

    Another option would be to use the Kendo Dialog:

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

    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.
Back to Top