Listen for on click event the element and sets time to midnight when the date is picked