i am using rails date time select. with start year and end year options. and here a user should be able to select all dates from the last year to till the current date. a user should not be allowed to select future dates for the current year. how can i do this? if i menction start date and end date options will that restrict the dates for the previous year also?
<%= f.datetime_select :check_out_req, { start_year: Date.today.year - 1,:end_year => Date.today.year,ampm: true, order: [:day, :month, :year] }, { class: "form-control" }