fixed datepicker bug