datepicker bug fix