Allow auto closing of datepicker when a date is chosen