I just got this wonderful plugin working.
I used this code in order to pop-up the calendar when the image is
"mouse-overd".
<%= popup_calendar 'resource', 'date',
{ :class => 'date',
:field_title => 'resource',
:button_image => 'calendar.gif',
:button_title => 'Show calendar' },
{ :firstDay => 1,
:range => [2007, 2008],
:step => 1,
:showOthers => true,
:cache => true,
:eventName =>'mouseover',
:electric => false}
%>
It works great. Now I would like to show the calendar always. Is there
a way to do this? I tryed to use just <%= calendar .... but this isn't
working. I would like to have it as a date picker as on
http://37signals.blogs.com/products/2007/06/improved_date_p.html .
Any ideas?
Thanks
-Tim
Thanks for the mouseover example!
> hmm, I think :flat is not working properly. Let me have a look.
ok.
:eventName => 'load' is working fine. Unfortunately only the first
time the page loads. After selecting a date, the calendar closes.
> Thanks for the mouseover example!
thanks for the great plugin ;-)
try it now.
> :flat is fixed.
> try it now.
Ah, great. The calendar shows up as wished ;-) Unfortunately the input-
field is no loger updated with the value clicked. Did I miss
something?
<%= calendar 'resource', 'date',
{ :class => 'date',
:form_name => 'sform'},
{ :firstDay => 1,
:range => [2007, 2009],
:step => 1,
:showOthers => true,
:electric => true,
}
%>
The input-tag is correctly inserted in the rendered page. Any clue?
thanks for the fix
regards
Tim
if ( !Date.prototype.__msh_oldSetFullYear ) {....
Thanks
> Can you check your calendar.js to make sure you got the fix "too much
> recursion" fix?
Yes it's there. ....
if ( !Date.prototype.__msh_oldSetFullYear ) {
Date.prototype.__msh_oldSetFullYear = Date.prototype.setFullYear;
Date.prototype.setFullYear = function(y) {
var d = new Date(this);
d.__msh_oldSetFullYear(y);
if (d.getMonth() != this.getMonth())
this.setDate(28);
this.__msh_oldSetFullYear(y);
};
}
Thanks in advance
On Jul 31, 4:52 am, Fladi <derfl...@gmail.com> wrote:
> Hi there!
>
> I just got this wonderful plugin working.
>
> I used this code in order to pop-up the calendar when the image is
> "mouse-overd".
>
> <%= popup_calendar 'resource', 'date',
> { :class => 'date',
> :field_title => 'resource',
> :button_image => 'calendar.gif',
> :button_title => 'Show calendar' },
> { :firstDay => 1,
> :range => [2007, 2008],
> :step => 1,
> :showOthers => true,
> :cache => true,
> :eventName =>'mouseover',
> :electric => false}
> %>
>
> It works great. Now I would like to show the calendar always. Is there
> a way to do this? I tryed to use just <%= calendar .... but this isn't
> Can you provide me this plugin and give me some first steps to use it?
You can download the latest version via SVN. The URL is:
http://dhtml-calendar.googlecode.com/svn/trunk/
The plugin is shipped with a good documentation...
Regards
Tim
Thanks.