fixed problems with datepicker