mdehoog / Semantic-UI-Calendar

Calendar module for Semantic UI
MIT License
804 stars 126 forks source link

Calendar does not pop up when clicked inside a modal #99

Closed huanghuan closed 6 years ago

huanghuan commented 7 years ago

When I embed a calendar input in a modal dialog, parsing/formatting works but the calendar popup never show up. Am I doing it wrong or it is simply impossible?

oqq commented 7 years ago

Hey @huanghuan!

After investigation at same issue I have found out the popup module from semantic ui would destroy himself if the popup not stay on DOM. In that case a mutation observer is triggered and the popup would be destroyed just in time with creation.

I have fixed that issue by disabling the observer.

$('.ui.calendar')
    .calendar({
        popupOptions: {
             observeChanges: false
        }
    }
);

Maybe that would help you.

huanghuan commented 7 years ago

@oqq Thank you very much Eric. That worked for me!

fjz97 commented 7 years ago

@oqq Nice job bro!

SimpleCookie commented 7 years ago

Works very well indeed

D4ni3lr commented 6 years ago

Thanks! This solves the issue.

carlosjln commented 6 years ago

Thanks a lot @oqq you saved my sanity! :+1:

BlueTi commented 5 years ago

Thanks a lot!

p-schlickmann commented 3 years ago

omg you saved me @oqq