Abstracting out date selector