Forum: Ruby on Rails how to use datepicker

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
05337aed68267daec2996e5ca732d476?d=identicon&s=25 Akbar (Guest)
on 2006-04-01 06:34
(Received via mailing list)
This is the webpage:
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:
<p><label for="product_date_available">Date available</label><br/>
<%= datetime_select 'product', 'date_available'  %></p>

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.
3dd4b52a0946bd698b1d1635a46ea3a3?d=identicon&s=25 François Beausoleil (fbeausoleil)
on 2006-04-01 06:40
(Received via mailing list)
Hi !

2006/3/31, Akbar <akbarhome@gmail.com>:
> '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 !
05337aed68267daec2996e5ca732d476?d=identicon&s=25 Akbar (Guest)
on 2006-04-01 07:01
(Received via mailing list)
On 4/1/06, Francois Beausoleil <francois.beausoleil@gmail.com> 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????
05337aed68267daec2996e5ca732d476?d=identicon&s=25 Akbar (Guest)
on 2006-04-01 07:50
(Received via mailing list)
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' %>
05337aed68267daec2996e5ca732d476?d=identicon&s=25 Akbar (Guest)
on 2006-04-01 07:56
(Received via mailing list)
It is very weird. Anything below this line is not rendered:
<%= date_picker_field 'product', 'date_available' %></p>

For example this is my code:
<p><label for="product_title">Title</label><br/>
<%= text_field 'product', 'title'  %></p>

<p><label for="product_date_available">Date available</label><br/>
<%= date_picker_field 'product', 'date_available' %></p>

<p><label for="product_description">Description</label><br/>
<%= text_area 'product', 'description'  %></p>

<p><label for="product_image_url">Image url</label><br/>
<%= text_field 'product', 'image_url'  %></p>

Product description and product image url do not show up. Any idea?
D566a291d8ee7c013649e47b3769d981?d=identicon&s=25 Carl Lerche (Guest)
on 2006-04-19 02:05
(Received via mailing list)
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
30269682335f1fb247d71969fa715b5e?d=identicon&s=25 Roberto Saccon (rsaccon)
on 2006-04-19 03:21
(Received via mailing list)
If you have more than one machine, you should also consider
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
This topic is locked and can not be replied to.