Extract datepicker as a helper.