fixed datepick bug