# Calendar date picker plugin

**URL:** <https://www.ruby-forum.com/t/calendar-date-picker-plugin/182632>\
**Category:** Rails\
**Created:** [January 31, 2010, 2:57pm UTC](https://www.ruby-forum.com/t/calendar-date-picker-plugin/182632 "2010-01-31T14:57:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajinder\_Y](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Post date:** [January 31, 2010, 2:57pm UTC](https://www.ruby-forum.com/t/calendar-date-picker-plugin/182632/1 "2010-01-31T14:57:19Z")

</div>

Hi I’m new to rails and trying to find a calendar picker plugin. I’ve  
come across ‘calendardateselect’, but I can’t seem to figure out step 4  
=P

The other one I tired is ‘activecalendar’ (does anyone know if this  
project is maintained?) I tried using this one and I am getting the  
following errors:

ArgumentError in Members#new

Showing app/views/members/new.html.erb where line #48 raised:

wrong number of arguments (4 for 3)

Extracted source (around line #48):

45:

  
46: 

47: \<%= f.label :bday %\>  
  
48: \<%= f.date\_select :bday %\>  
49:

  
50: 

51: \<%= f.label :last\_visit\_date %\>

Is there something better out there, easier to use with no fuzz and  
actually has some documentation?

–  
Kind Regards,  
Rajinder Y. | [http://DevMentor.org](http://DevMentor.org) | Do Good! - Share Freely

---

<div class="post-metadata">

**Author:** ![Rajinder\_Y](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Post date:** [January 31, 2010, 4:55pm UTC](https://www.ruby-forum.com/t/calendar-date-picker-plugin/182632/2 "2010-01-31T16:55:31Z")

</div>

calendar\_date\_select is the easiest. Step 4 is just:  
\<%= calendar\_date\_select\_includes “red” %\> or whatever color you  
want.

---

<div class="post-metadata">

**Author:** ![Rajinder\_Y](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Post date:** [January 31, 2010, 6:47pm UTC](https://www.ruby-forum.com/t/calendar-date-picker-plugin/182632/3 "2010-01-31T18:47:19Z")

</div>

Me wrote:

> calendar\_date\_select is the easiest. Step 4 is just:  
> \<%= calendar\_date\_select\_includes “red” %\> or whatever color you  
> want.

unfortunately I don’t understand easy =P

1. I included the following into my new.html.erb scaffold test code at  
the top

\<%= javascript\_include\_tag :defaults %\>  
\<%= calendar\_date\_select\_includes %\>

1. Next I added to the of my layout html.erb file

\<%= calendar\_date\_select\_includes “red” %\>

1. Finally next to the date field in the form\_for I have something like  
this:

Now when I stop/stop Webrick and refresh my page I get the following  
error dialog box

“CalendarDateSelect Error: prototype could not be found…”

What prototype as I missing and where should it be added?

---

<div class="post-metadata">

**Author:** ![Rajinder\_Y](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Post date:** [January 31, 2010, 7:01pm UTC](https://www.ruby-forum.com/t/calendar-date-picker-plugin/182632/4 "2010-01-31T19:01:57Z")

</div>

Rajinder Y. wrote:

> ```
> <%= javascript_include_tag :defaults %>
> <%= f.label :bday %> <%= calendar_date_select_tag "e_date" %> <br/>
> <%= f.date_select :bday %>
> 
> ```
> 
> Now when I stop/stop Webrick and refresh my page I get the following  
> error dialog box
> 
> “CalendarDateSelect Error: prototype could not be found…”
> 
> What prototype as I missing and where should it be added?

OK never mind, it mysteriously started to work now? I’ll play around  
with it a bit more.

> > > 47: \<%= f.label :bday %\>  
> > >   
> > > Rajinder Y. |[http://DevMentor.org|](http://DevMentor.org%7C) Do Good! - Share Freely

–  
Kind Regards,  
Rajinder Y. | [http://DevMentor.org](http://DevMentor.org) | Do Good! - Share Freely

---

<div class="post-metadata">

**Author:** ![Rajinder\_Y](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/91b2a8/32.png) [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Post date:** [February 1, 2010, 1:45am UTC](https://www.ruby-forum.com/t/calendar-date-picker-plugin/182632/5 "2010-02-01T01:45:20Z")

</div>

Rajinder Y. wrote:

> Rajinder Y. wrote:
> 
> > ```
> > <%= javascript_include_tag :defaults %>
> > <%= f.label :bday %> <%= calendar_date_select_tag "e_date" %> <br/>
> > <%= f.date_select :bday %>
> > 
> > ```
> > 
> > Now when I stop/stop Webrick and refresh my page I get the following  
> > error dialog box
> > 
> > “CalendarDateSelect Error: prototype could not be found…”
> > 
> > What prototype as I missing and where should it be added?

Probably the prototype.js library itself. It’s included with Rails,  
but you have to make sure the generated page brings it in with an  
appropriate tag.

> OK never mind, it mysteriously started to work now? I’ll play around  
> with it a bit more.
> 
> > > > 47: \<%= f.label :bday %\>  
> > > >   
> > > > Rajinder Y. |[http://DevMentor.org|](http://DevMentor.org%7C) Do Good! - Share Freely
> 
> –  
> Kind Regards,  
> Rajinder Y. | [http://DevMentor.org](http://DevMentor.org) | Do Good! - Share Freely

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
