add datepicker select function