Fix date selection bug.