How to make date_select have a blank option?

I use date_select to generate a birthday field.
I want to make this field optional.
How can I make date_select have a blank option?

On 21/12/06, Nanyang Z. [email protected] wrote:

I use date_select to generate a birthday field.
I want to make this field optional.
How can I make date_select have a blank option?

From the API docs:

date_select(“post”, “written_on”, :start_year => 1995,
:use_month_numbers => true,
:discard_day => true,
:include_blank => true)

Jamie Wilson wrote:

From the API docs:

date_select(“post”, “written_on”, :start_year => 1995,
:use_month_numbers => true,
:discard_day => true,
:include_blank => true)

It works. thanks.

Jamie Wilson wrote:

On 21/12/06, Nanyang Z. [email protected] wrote:

I use date_select to generate a birthday field.
I want to make this field optional.
How can I make date_select have a blank option?

From the API docs:

date_select(“post”, “written_on”, :start_year => 1995,
:use_month_numbers => true,
:discard_day => true,
:include_blank => true)

I use this too, but now when I only select a day, it writes it to the
database as the 1st of januari of the year (the day I specified). This
is not good, as it fucks up the system. Any way to solve this?

Sorry, but if DHH can proclaim “FUCK YOU” to the world in a Rails
conference keynote address, I hardly think that we need police the
casual use of the word on the list. Is there a “no swearing” rule for
the list somewhere?

b

Dax H. wrote:

I use this too, but now when I only select a day, it writes it to the
database as the 1st of januari of the year (the day I specified). This
is not good, as it fucks up the system. Any way to solve this?

Can I ask you please to be careful of your language on a public list ?

A.

It is about courtesy and civility.
-Larry

On 2/15/07, Ben M. [email protected] wrote:

Dax H. wrote:


Best Regards,
-Larry
“Work, work, work…there is no satisfactory alternative.”
— E.Taft Benson