# Prompt for date\_select()?

**URL:** <https://www.ruby-forum.com/t/prompt-for-date-select/138332>\
**Category:** Rails\
**Created:** [May 22, 2008, 4:12am UTC](https://www.ruby-forum.com/t/prompt-for-date-select/138332 "2008-05-22T04:12:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![athem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/22d042/32.png) [@athem](https://www.ruby-forum.com/u/athem)\
**Post date:** [May 22, 2008, 4:12am UTC](https://www.ruby-forum.com/t/prompt-for-date-select/138332/1 "2008-05-22T04:12:11Z")

</div>

Is there a way to add a prompt(s) for the dropdowns generated by  
date\_select? Shooting in the dark, I tried using :prompt =\> true with  
no result.

Thanks.

---

<div class="post-metadata">

**Author:** ![athem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/22d042/32.png) [@athem](https://www.ruby-forum.com/u/athem)\
**Post date:** [May 22, 2008, 4:18am UTC](https://www.ruby-forum.com/t/prompt-for-date-select/138332/2 "2008-05-22T04:18:36Z")

</div>

How about an html label element?

Date:

The date\_select methods only gives you the html element.

Kyle

---

<div class="post-metadata">

**Author:** ![athem](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/22d042/32.png) [@athem](https://www.ruby-forum.com/u/athem)\
**Post date:** [May 22, 2008, 6:13am UTC](https://www.ruby-forum.com/t/prompt-for-date-select/138332/3 "2008-05-22T06:13:50Z")

</div>

On May 21, 7:18 pm, Kyle B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Is there a way to add a prompt(s) for the dropdowns generated by  
> > date\_select? Shooting in the dark, I tried using :prompt =\> true with  
> > no result.

Actually, I don’t think I clearly expressed my question. I meant  
having the dropdown itself (not a label) display a prompt similar to:

\<%= f.collection\_select :id,  
@vehicle\_types, :id, :vehichle\_type, :prompt =\> “Select Vehicle” %\>

or simply

:prompt =\> true

to display “Select.” The date\_select() method is very useful, but I  
can’t see a way to use :prompt as in other select methods. Thanks.
