Small refactor dateSelector