tiny-date-picker
tiny-date-picker copied to clipboard
Input field in modal, date picker closes on button click
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);
}
})
);
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.