change date selection logic