fulup-bzh / DatePicker

Date Picker compatible with Zurb Foundation under Angular framework.
Other
11 stars 11 forks source link

Datepicker do not close while clicking outside #4

Closed bodhisatwag closed 8 years ago

bodhisatwag commented 9 years ago

The Foundation/Bootstrap/jQuery datepickers close on clicking outside it. But this one does not. Please look into it. Might be a simple blody click event would work.

fulup-bzh commented 9 years ago

You're right, this is a new bug coming from my last correction. I unfortunately doubt to have time to fix it before next week. In the mean time "esc" close the picker.

fulup-bzh commented 9 years ago

I need to dig more, I tried a quick fix by adding inside "scope.bindevent" method a window.addEventListener("click", closepicker , true). Unfortunately this listener trap mouse click both inside and outside the picker.

If you have any idea of a good model to trap mouseclick when outside the picker, please let me know.