Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clicking on a datepicker-cell triggers bootstrap 5 modal closing #139

Open
JVT038 opened this issue Apr 6, 2023 · 1 comment
Open

Clicking on a datepicker-cell triggers bootstrap 5 modal closing #139

JVT038 opened this issue Apr 6, 2023 · 1 comment

Comments

@JVT038
Copy link

JVT038 commented Apr 6, 2023

Like the title says.
I have a datepicker inside of a bootstrap modal and when I click on a cell (a year, month, decade), it triggers the modal to close.
For some reason bootstrap thinks the datepicker is outside of the modal, which causes it to close.
Can this be fixed?

@mymth
Copy link
Owner

mymth commented Apr 8, 2023

I can't reproduce the problem.
https://codepen.io/mymth/pen/dygPNZg

I guess some other program may be doing something like this

document.querySelectorAll('#myModal span').forEach((spanElem) => {
  spanElem.addEventListener('click', () => {
    // ...do something
    //
    myModal.hide();
  });
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants