In my form I have two date fields, :start_date
and :end_date
, related to a job. There is a month and a year.
Just like on LinkedIn, the end year might not be relevant, for your current job.
Therefore, I'm looking for the way to replace the :end_date
with "present"
when the User tick the box "current position".
What's the right way to do this?
Update
My code at the moment:
<%= f.date_select :end_date, { discard_day: true } %>