fix bug with datepicker