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

Input field in modal, date picker closes on button click #102

Open
eimantasbucys opened this issue Jan 21, 2019 · 1 comment
Open

Input field in modal, date picker closes on button click #102

eimantasbucys opened this issue Jan 21, 2019 · 1 comment

Comments

@eimantasbucys
Copy link

So I have my input field in modal and using dp-below, I changed z-index in css file to draw date picker on top of my modal but the problem is when I press any button on date picker (eg. next or previous month) it closes.
In chrome dev tools I can see it fires this event:

    on(
      "blur",
      calEl,
      bufferFn(150, function() {
        if (!dp.hasFocus()) {
          dp.close(true);
        }
      })
    );
@eimantasbucys eimantasbucys changed the title Input field in modal Input field in modal, date picker closes on button click Jan 21, 2019
@vigorouscoding
Copy link

I just ran into the same problem and found a quick and dirty solution.

The modal has tabindex="-1" role="dialog" and the element directly underneath it has role="document". Removing all of those attributes solved the problem for me.

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