refactoring endDate datepicker and select menu