I'm currently studding jqueryui datepicker, and I can't understand, how it prevents onblur effect on an input.
That is: when You click on an input with datepicker, the calendar appears, and You can click on next/prev month, but an input stays focused. You also may click anywhere within calendar and it does not disappear. But when You click any other link outside calendar and input, calendar disappears and link works, that means there doesn't exist any transparent div over a page that holds onclick event (for closing calendar).
It seems there is something like onblur event that is binded to an input. But this event doesn't trigger when You click within calendar. How do they do that?
A similar question was discussed here, but in jquery datepicker there is no timeouts.