# How to use datepicker

**URL:** <https://www.ruby-forum.com/t/how-to-use-datepicker/56566>\
**Category:** Rails\
**Created:** [April 1, 2006, 6:34am UTC](https://www.ruby-forum.com/t/how-to-use-datepicker/56566 "2006-04-01T06:34:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akbar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d07c76/32.png) [@Akbar](https://www.ruby-forum.com/u/Akbar)\
**Post date:** [April 1, 2006, 6:34am UTC](https://www.ruby-forum.com/t/how-to-use-datepicker/56566/1 "2006-04-01T06:34:37Z")

</div>

This is the webpage:  
[http://projects.exactlyoneturtle.com/date\_picker/](http://projects.exactlyoneturtle.com/date_picker/)

I have downloaded and installed it. But how do I use in view page?

This is the usual view with ordinary datetime\_select:

Date available  
\<%= datetime\_select 'product', 'date\_available' %\>

So I have table named ‘product’ with one of the column named  
‘date\_available’. How do I use date\_picker rather than  
datetime\_select?

The author give html page not rhtml page.

Thanks.

---

<div class="post-metadata">

**Author:** ![Akbar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d07c76/32.png) [@Akbar](https://www.ruby-forum.com/u/Akbar)\
**Post date:** [April 1, 2006, 6:40am UTC](https://www.ruby-forum.com/t/how-to-use-datepicker/56566/2 "2006-04-01T06:40:40Z")

</div>

Hi !

2006/3/31, Akbar [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> ‘date\_available’. How do I use date\_picker rather than  
> datetime\_select?
> 
> The author give html page not rhtml page.

You’ll need to copy the helper. This should really be packaged as a  
plugin, but it’s not at the moment. Anyway, copy the helper to your  
application’s lib/. Then, you can use this:

\<%= label ‘Sale Starts On’, :product, :sale\_starts\_on %\>  
\<%= date\_picker\_field :product, :sale\_starts\_on %\>

Hope that helps !

---

<div class="post-metadata">

**Author:** ![Akbar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d07c76/32.png) [@Akbar](https://www.ruby-forum.com/u/Akbar)\
**Post date:** [April 1, 2006, 7:01am UTC](https://www.ruby-forum.com/t/how-to-use-datepicker/56566/3 "2006-04-01T07:01:46Z")

</div>

On 4/1/06, Francois B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi !
> 
> You’ll need to copy the helper. This should really be packaged as a  
> plugin, but it’s not at the moment. Anyway, copy the helper to your  
> application’s lib/. Then, you can use this:
> 
> \<%= label ‘Sale Starts On’, :product, :sale\_starts\_on %\>  
> \<%= date\_picker\_field :product, :sale\_starts\_on %\>

Not work. The interesting is rails does not want to render anything  
below date\_picker\_field line. When I click Choose Date, it just go to  
the current page add with # in the end. You mean product is product  
table and sale\_starts\_on is a column of the product table with type  
date, right???

---

<div class="post-metadata">

**Author:** ![Akbar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d07c76/32.png) [@Akbar](https://www.ruby-forum.com/u/Akbar)\
**Post date:** [April 1, 2006, 7:50am UTC](https://www.ruby-forum.com/t/how-to-use-datepicker/56566/4 "2006-04-01T07:50:11Z")

</div>

Sorry, solve it my self. Forgot to put this in the layout view:  
\<%= stylesheet\_link\_tag ‘scaffold’, ‘depot’, ‘admin’, ‘date-picker’,  
:media =\> “all” %\>  
\<%= javascript\_include\_tag ‘date-picker’ %\>

---

<div class="post-metadata">

**Author:** ![Akbar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d07c76/32.png) [@Akbar](https://www.ruby-forum.com/u/Akbar)\
**Post date:** [April 1, 2006, 7:56am UTC](https://www.ruby-forum.com/t/how-to-use-datepicker/56566/5 "2006-04-01T07:56:19Z")

</div>

It is very weird. Anything below this line is not rendered:  
\<%= date\_picker\_field ‘product’, ‘date\_available’ %\>

For example this is my code:

Title  
\<%= text\_field 'product', 'title' %\>

Date available  
\<%= date\_picker\_field 'product', 'date\_available' %\>

Description  
\<%= text\_area 'product', 'description' %\>

Image url  
\<%= text\_field 'product', 'image\_url' %\>

Product description and product image url do not show up. Any idea?

---

<div class="post-metadata">

**Author:** ![Akbar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d07c76/32.png) [@Akbar](https://www.ruby-forum.com/u/Akbar)\
**Post date:** [April 19, 2006, 2:05am UTC](https://www.ruby-forum.com/t/how-to-use-datepicker/56566/6 "2006-04-19T02:05:15Z")

</div>

Hello,

I’m trying to implement a search feature in a project I’m working on.  
Here is the gist of it. The project is basically a classified site  
which allows people to post a classified ad in a category and specify  
the zip code. I would like to let people search classifieds that are  
local to them (defined as within 15 miles of their zip). So, would it  
be possible to use Ferret to provide searching of the classifieds on  
a local basis? Before, with mysql fulltext search I could do a join  
between the zip table and the classifieds table, but I found the  
results to not be great.

Also, it seems that ferret stores the index file locally. What  
happens if I add extra web servers and use load balancing? What  
happens to the index in this case?

Thanks,  
Carl

---

<div class="post-metadata">

**Author:** ![Akbar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d07c76/32.png) [@Akbar](https://www.ruby-forum.com/u/Akbar)\
**Post date:** [April 19, 2006, 3:21am UTC](https://www.ruby-forum.com/t/how-to-use-datepicker/56566/7 "2006-04-19T03:21:26Z")

</div>

If you have more than one machine, you should also consider  
[http://hyperestraier.sourceforge.net/](http://hyperestraier.sourceforge.net/), which is written in C, but has  
ruby-bindings and search is accessible via http and it has a rails  
plugin
