chrisdavies / tiny-date-picker

A small, modern, dependency-free date picker
https://chrisdavies.github.io/tiny-date-picker/
415 stars 88 forks source link

Dropdown date picker is not closing fast enough #112

Open labros-zotos opened 4 years ago

labros-zotos commented 4 years ago

I have two input fields(one next to each other) with dropdown date picker enabled for both of them. When I click on one of the fields the dropdown date picker is displayed as it is expected.

However when I click on the second field (while the date picker of the first one is still open) there is a delay in closing the first date picker. As a result two date pickers are displayed for half a second one on top of the other.

Has anyone else encountered this issue? Is there a delay somewhere in the source code that I cannot find, maybe bound to a click or focus event?

Thank you in advance.

mnvdmitry commented 4 years ago

Try to hang the handler on the container and check that the click is made outside it https://github.com/chrisdavies/tiny-date-picker/blob/02f8b092f16803d46321929e53b8b804456c37aa/test/date-range.html