# calendar date picker plugin

**URL:** <https://discuss.rubyonrails.org/t/calendar-date-picker-plugin/49004>\
**Category:** rubyonrails-talk\
**Created:** [January 31, 2010, 1:54pm UTC](https://discuss.rubyonrails.org/t/calendar-date-picker-plugin/49004 "2010-01-31T13:54:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dev\_Guy](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dev\_Guy](https://discuss.rubyonrails.org/u/Dev_Guy)\
**Post date:** [January 31, 2010, 1:54pm UTC](https://discuss.rubyonrails.org/t/calendar-date-picker-plugin/49004/1 "2010-01-31T13:54:48Z")

</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: \</p\> 46: \<p\> 47: \<%= f.label :bday %\>\<br /\> 48: \<%= f.date\_select :bday %\> 49: \</p\> 50: \<p\> 51: \<%= f.label :last\_visit\_date %\>\<br /\>

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

---

<div class="post-metadata">

**Author:** ![Chris\_Habgood](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@Chris\_Habgood](https://discuss.rubyonrails.org/u/Chris_Habgood)\
**Post date:** [January 31, 2010, 3:53pm UTC](https://discuss.rubyonrails.org/t/calendar-date-picker-plugin/49004/2 "2010-01-31T15:53:59Z")

</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:** ![Dev\_Guy](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dev\_Guy](https://discuss.rubyonrails.org/u/Dev_Guy)\
**Post date:** [January 31, 2010, 5:45pm UTC](https://discuss.rubyonrails.org/t/calendar-date-picker-plugin/49004/3 "2010-01-31T17:45:23Z")

</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

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

2) Next I added to the \<head\> of my layout html.erb file

&nbsp;&nbsp;\<%= calendar\_date\_select\_includes "red" %\>

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

&nbsp;&nbsp;&nbsp;\<p\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<%= f.label :bday %\> \<%= calendar\_date\_select\_tag "e\_date" %\> \<br/\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\<%= f.date\_select :bday %\> &nbsp;&nbsp;&nbsp;\</p\>

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:** ![Dev\_Guy](https://avatars.discourse-cdn.com/v4/letter/d/ec9cab/32.png) [@Dev\_Guy](https://discuss.rubyonrails.org/u/Dev_Guy)\
**Post date:** [January 31, 2010, 6:00pm UTC](https://discuss.rubyonrails.org/t/calendar-date-picker-plugin/49004/4 "2010-01-31T18:00:02Z")

</div>

Rajinder Yadav wrote:

> 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
> 
> &nbsp;&nbsp;&nbsp;&nbsp;\<%= javascript\_include\_tag :defaults %\> &nbsp;&nbsp;&nbsp;&nbsp;\<%= calendar\_date\_select\_includes %\>
> 
> 2) Next I added to the \<head\> of my layout html.erb file
> 
> &nbsp;&nbsp;&nbsp;&nbsp;\<%= calendar\_date\_select\_includes "red" %\>
> 
> 3) Finally next to the date field in the form\_for I have something like this:
> 
> &nbsp;&nbsp;\<p\> &nbsp;&nbsp;&nbsp;&nbsp;\<%= f.label :bday %\> \<%= calendar\_date\_select\_tag "e\_date" %\> \<br/\> &nbsp;&nbsp;&nbsp;&nbsp;\<%= f.date\_select :bday %\> &nbsp;&nbsp;\</p\>
> 
> 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.

---

<div class="post-metadata">

**Author:** ![11155](https://avatars.discourse-cdn.com/v4/letter/1/d26b3c/32.png) [@11155](https://discuss.rubyonrails.org/u/11155)\
**Post date:** [February 1, 2010, 12:45am UTC](https://discuss.rubyonrails.org/t/calendar-date-picker-plugin/49004/5 "2010-02-01T00:45:20Z")

</div>

Rajinder Yadav wrote:

> Rajinder Yadav wrote:
> 
> > &nbsp;&nbsp;&nbsp;&nbsp;\<%= javascript\_include\_tag :defaults %\> &nbsp;&nbsp;&nbsp;&nbsp;\<%= f.label :bday %\> \<%= calendar\_date\_select\_tag "e\_date" %\> \<br/\> &nbsp;&nbsp;&nbsp;&nbsp;\<%= f.date\_select :bday %\> &nbsp;&nbsp;\</p\>
> > 
> > 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 \<script\> tag.

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

Best,
