Update date picker and close date picker when date is selected