support choose date by function