fix datepicker bug