Is there an easy way to have the option to not specify a date or datetime in a Rails form that uses datetime_select
, date_select
or time_select
? By default, the fields are set at the current date/time and there's no way to not choose a date/time.
Using Rails 3.2.8
What you want is the include_blank
option: (Nil value on datetime_select?)
f.datetime_select :attr_name, include_blank: true