add some logic to date range selector