fixed some issue about datepicker