bootstrap-datepicker
bootstrap-datepicker copied to clipboard
Clicking outside the datepicker to close it uses mousedown, so won't work on mobile
I can't see any immediately obvious reason why this click
wouldn't work as a direct substitute.
This was already solved in Release 1.3.0 #481, but somehow now it’s not in the code anymore. See also 511c1b0241eb9804892df6f9388e0afd00107253.
@peterjwest: what version of datepicker do you use?
Just looking through the code on master and latest release https://github.com/eternicode/bootstrap-datepicker/blob/v1.5.0/js/bootstrap-datepicker.js#L423
This #820 and this #1284.
I guess this PR was merged a bit too quickly.
The issue was more that the check to see if touchstart
was out of the datepicker wasn't working.
I can look into this @hebbet
After few tests, it looks like before #1284, it worked as expected, meaning the picker close only when the screen is touched out of the picker.
So the call here would be to choose:
- Close on
touchstart
like<1.3.0
- Do not close on
touchstart
- Give the option to close or not on
touchstart
(and maybe onmousedown
) - Give the option to show a close button
Imo it would be interesting to work more on the mobile integration, maybe open a new ticket for this, there is much to say.
This is still open? o.o