Attach event listeners to the onmouseover and onmouseout events so that
the datepicker will close when the user clicks outside of the calendar.