modified the bug of the datepicker