Close a picker when date is selected (dateOnly mode)

Close datepicker when closeOnSelected is true, inLine is false and dateOnly is specified. As it is, the DatePicker won't close if a date is selected and the timepicker is hidden.