finishes datepicker refactor