a bug fixed for endDatepicker