Make defaultDate work when input val is undefined