fix error with datepicker