Nil dates in selct_date

Can one specify to date_select that a nil value is permitted and is the
default value? Is it possible to add nil to the list of permitted
values in a date_select call? The code in
seems to treat nil as now.

654         def default_time_from_options(default)
655           case default
656             when nil
658             when Date, Time
659               default

I have a situation where a record may have a superseded date but which
is left as null if the date is not set. It is also possible that the
value may need to be reset to nil if the record is activated again. I
would like to retain the convenience of the date picker in rails but I
need to ahve this functionality. How does one accomplish this?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs