Closing datepicker once a date has been selected

Changed behaviour of datepicker. The datepicker is now being closed once you have selected a specific date.