Closed BoleLee closed 7 years ago
I'm sorry that it wasn't the calendar problem, in my project, I use both semantic and semantic-ui-calendar, in some places, calendar didn't work, in another place, popup didn't work, I haven't find the reason.
I found that only when the calendar or popup is in the modal, it didn't work.
See #21 #33 #40.
the popup or calendar didn't show in the modal, because the popup has a default setting: observeChanges: true
. when the modal is initialized:
"The modal component always moves a modal’s HTML from its original place in DOM to a certain wrapper during the initialization", and "The popup’s mutationObserver sees that the modal’s HTML was removed and destroys the popup."
To solve the problem:
- setting observeChanges to false in the calendar code at line about 140;
- initial the calendar after the modal was initialized.
the answer is from semantic-ui issue 4860#issuecomment-297702810
I import semantic-ui-calendar like this, however it didn't work, I'm not sure what's wrong?