popup calendar not working.

8 views
Skip to first unread message

magi...@gmail.com

unread,
Nov 7, 2007, 3:45:19 PM11/7/07
to Ruby on Rails: DHTML Calendar
I cant get the pop_up calender to actually popup.

<%= popup_calendar 'project', 'start',
{ :class => 'date',
:field_title => 'start',
:button_image => 'calendar.gif',
:button_title => 'Show calendar' },
{ :firstDay => 1,
:range => [2007, 2009],
:step => 1,
:showOthers => true,
:cache => true }
%>

CCH

unread,
Nov 11, 2007, 9:34:05 AM11/11/07
to Ruby on Rails: DHTML Calendar
Hi

If you are using Active Scaffold, it is actually pretty easy as
follows:-

1) In your layout rhtml files,
<%= javascript_include_tag :defaults %>
<%= active_scaffold_includes %>
<%= stylesheet_link_tag 'active_scaffold_overrides'%>
<%= dhtml_calendar_includes %>

2) in your controller
config.columns[:date_column].form_ui = :calendar

HTH

CCH
http://cch4rails.blogspot.com

patty

unread,
Nov 14, 2007, 3:03:51 PM11/14/07
to Ruby on Rails: DHTML Calendar
I can't get it to popup either and I am not using Active Scaffold.
Were you able to figure out how to get it to popup? I see the icon
and the tooltip but clicking fails to popup the calendar.

Ed Moss

unread,
Nov 15, 2007, 4:54:38 AM11/15/07
to Ruby on Rails: DHTML Calendar
If possible, something like FireBug in FireFox can you give you the JS
errors. If there is a bug that needs fixing we should be able to track
it down.

Thanks.

patty

unread,
Nov 17, 2007, 3:37:56 PM11/17/07
to Ruby on Rails: DHTML Calendar
I'm using FireFox and there are no java script errors in the Tools-
>Error Console. Didn't install FireBug. However...I discovered that
I can get the calendar to popup if I don't have the popup as a cell in
an html table row. Any advice on that?

<td><%= popup_calendar 'person', 'birthday',
{ :class => 'date',
:field_title => 'Birthday',
:button_image => 'calendar.gif',
:button_title => 'Show calendar' },
{ :firstDay => 1,
:range => [1920, 1990],
:step => 1,
:showOthers => true,
:cache => true }
%> </td>

patty

unread,
Nov 25, 2007, 3:15:03 PM11/25/07
to Ruby on Rails: DHTML Calendar
Strangely, if I have 2 calendars in my table the subsequent one
works. Here is some sample code showing the table where the first
calendar fails to popup but the second one does.

<html>
<body>
<%= dhtml_calendar_includes %>
<table>

<tr><td>
<%= popup_calendar 'person', 'birthday',
{ :class => 'date',
:field_title => 'Birthday',
:button_image => 'calendar.gif',
:button_title => 'Show calendar' },
{ :firstDay => 1,
:range => [1920, 1990],
:step => 1,
:showOthers => true,
:cache => true }
%>
</td></tr>

<tr><td>
<%= popup_calendar 'person', 'birthday',
{ :class => 'date',
:field_title => 'Birthday',
:button_image => 'calendar.gif',
:button_title => 'Show calendar' },
{ :firstDay => 1,
:range => [1920, 1990],
:step => 1,
:showOthers => true,
:cache => true }
%>
</td></tr>

</table>

</body>
</html>
Reply all
Reply to author
Forward
0 new messages