Hide datepicker when a date is selected