refactor selectdate to match select