I am using date_select for two of my fields in the db -
<div class="control-group">
<label class="control-label">
<%= f.label :date_one %></label>
<div class="controls">
<%= f.date_select :date_one%>
</div>
</div>
<div class="control-group">
<label class="control-label">
<%= f.label :date_two %></label>
<div class="controls">
<%= f.date_select :date_two%>
</div>
</div>
Now what I am trying to do here is, no matter what date is selected for date_one
, date_two
shouldnt be before what has been selected for date_one
. Is that possible? How do I do it? Is it possible to setup a validation of some kind?
Thanks