fixed bug with datepicker