tiny-date-picker icon indicating copy to clipboard operation
tiny-date-picker copied to clipboard

Input field in modal, date picker closes on button click

Open eimantasbucys opened this issue 6 years ago • 1 comments

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 avatar Jan 21 '19 15:01 eimantasbucys

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.

vigorouscoding avatar Sep 25 '19 14:09 vigorouscoding