Only update the input value when focus is lost

This allow user to directly edit the date in the input.