fixed bug where popup would hide instantly when clicking the date