Fixing the bug that the calendar elements hides when click anywhere on the calendar