Need Help With Datebock plugin

Nathaniel,

Sorry we had a 3 day weekend here. So after reading your posts seem
there is a newer version out. Tried it once again and still nothing.
Does AJAX interfere with this datebocks? Does use of another stylesheet
interfere with this plugin? I tried using datebocks in Firefox 2.0.0.3
with a Noia skin and in IE 7.0.5730.11

Here is the view page source output of datebocks:

Not exactly sure if that is what you’re looking for. Line in my partial
form. <%= toolbocks_date_select ‘table_rate’, ‘start_date’, { :format
=> ‘us’ } %>

Using Ruby 1.8.4 and Rails 1.2.3.

Thanks.

daniel

Whether its a plugin or an engine doesn’t make a difference.

Those who want to discourage you from using engines really should
stop, but they unfortunately wont as they are blinded by some unknown
force that compels them to cause needless fear and doubt in those that
are considering it.

Simple as it gets, engines provide someting that Plugins don’t. An
intuitive way to manage assets. On load, all assets are moved over
into the public directory. I consistently find myself modifying the
assets, and all I need to do is update my svn and restart the server
to see them active. No third step, running a rake task.

I have been considering having the engine also double as a standard
plugin with an associative rake task, just to please those that
consider it “overkill”, but that is way on the back burner.

What measure to you have to assume that an “engine” is anything more
than a “plugin” anyways? Have you done any benchmarks to see if it
does indeed cause more load on the app? I seriously doubt this is not
the case, and if it is, the numbers would be similar to comparing Ruby
to Perl, where using one simply saves more time than using the other,
forget about the “overkill” and start comparing what really matters.

Nathaniel.

On 3/26/07, glenn [email protected] wrote:


Nathaniel Steven Henry Brown

Toll Free: 1-877-446-4647
Vancouver: 604-724-6624

Nathaniel,

Ok, I don’t have a URL but I’m willing to send you my project over.
Please email me at [email protected] But checking the error console I
get this error:

Error: DatetimeToolbocks is not defined
Source file http://localhost:3000/table_rate/create Line 153

I click on the error and it brings me to,

where new DatetimeToolbocks is highlighted.

The line in my code is like this.

<%= toolbocks_date_select ‘table_rate’, ‘start_date’ %>

Hope to hear from you soon Nathaniel and yes I can see the control on
your page.

dlo

Nathaniel B. wrote:

Very strange. Does it at least work when you visit
http://datetime.toolbocks.com ?

You might have to restart your server if you didn’t already do so. You
ma have old javascript old in your public dir which gets updated on
restart.

Also, if you have a URL I can check out, I wouldn’t mind seeing it for
myself. There should be a javascript error that appears. If you can
paste that in here, would definaely help track down the reason why
it’s not working for you.

Nathaniel.

Very strange. Does it at least work when you visit
http://datetime.toolbocks.com ?

You might have to restart your server if you didn’t already do so. You
ma have old javascript old in your public dir which gets updated on
restart.

Also, if you have a URL I can check out, I wouldn’t mind seeing it for
myself. There should be a javascript error that appears. If you can
paste that in here, would definaely help track down the reason why
it’s not working for you.

Nathaniel.

On 3/27/07, dlo [email protected] wrote:

    </script>


Posted via http://www.ruby-forum.com/.


Nathaniel Steven Henry Brown

Toll Free: 1-877-446-4647
Vancouver: 604-724-6624

What up Conrad. I’m using the same Ruby, Rails, etc. I just don’t get
it. I don’t know what I’m doing wrong. Thanks though. Do you mind
putting your code as far as the one used in the form to show the
control? Thanks

dlo

Conrad T. wrote:

Hi dlo, I was able to successfully install it. BTW, I was using Ruby
1.8.6, Rails 1.2.3, Engines 1.2, and Rake 0.7.2. It took me about 20
minutes to get a test application up and operational using the most
current version of Datetime Toolbocks.

-Conrad

Hey Dlo,

Sounds like you might not be including all the javascripts as required.

You can send it to me at nshb(at)inimit.com

If you have any externals, use svn export before you tar/zip it up so
I make sure I get the same.

Nathaniel.

On 3/28/07, dlo [email protected] wrote:

I click on the error and it brings me to,
});

Also, if you have a URL I can check out, I wouldn’t mind seeing it for


Nathaniel Steven Henry Brown

Toll Free: 1-877-446-4647
Vancouver: 604-724-6624

Hi dlo, I was able to successfully install it. BTW, I was using Ruby
1.8.6, Rails 1.2.3, Engines 1.2, and Rake 0.7.2. It took me about 20
minutes to get a test application up and operational using the most
current version of Datetime Toolbocks.

-Conrad

Hi Nathaniel, I was looking for option(s) to create an inline calendar
using the datetime toolbooks?

-Conrad

Hey Conrad,

You could have used

http://svn.toolbocks.com/demos/datetime_toolbocks/

Instantly up and running app :slight_smile:

Dlo, that might work for you as well. As a working reference anyways.
That’s whats running on http://datetime.toolbocks.com

Nathaniel.

On 3/28/07, Conrad T. [email protected] wrote:

Hi everyone,
<%= datebocks_field(‘table_rate’, ‘date_column’) %>
to my layout.
isn’t that much about Datebocks and Engines 1.2. Thanks in advance


Nathaniel Steven Henry Brown

Toll Free: 1-877-446-4647
Vancouver: 604-724-6624

Hey Conrad,

As I said, I haven’t done this before, so there is no “simple” way to
do it yet with the library, but the library will provide full access
to integrate it. The calendar_options param passes through all the
options to the Calendar.setup initialization.

http://www.dynarch.com/demos/jscalendar/simple-2.html

So… something like this would work…

… ok so axe all that.

I just spent the morning hacking away at it :slight_smile: And voila… v3.0.3

You can now do this…

<%= toolbocks_date_select :model, :column, {}, { :flat => 'calendar-container' } %>

or to have Datetime Toolbocks do everything for you and make it even
simpler, try this…

<%= toolbocks_date_select(:model, :column, {}, { :flat => true }) %>

or to do something like the example in the dynarch.com website above…

<%= toolbocks_date_select(:model, :column, {}, { :flat => true,
:flatCallback => ‘javascript:dateChanged’ }) %>

You can also checkout all the demos I use to test with here…

http://svn.toolbocks.com/plugins/datetime_toolbocks/app/views/datetime_toolbocks/_demos.rhtml

Enjoy!

Nathaniel.

On 3/29/07, Conrad T. [email protected] wrote:

You could have used
On 3/28/07, Conrad T. [email protected] wrote:

Hi everyone,
<%= datebocks_field(‘table_rate’, ‘date_column’) %>
to my layout.
isn’t that much about Datebocks and Engines 1.2. Thanks in advance


Nathaniel Steven Henry Brown

Toll Free: 1-877-446-4647
Vancouver: 604-724-6624

The whole point of the plugin is to extend the date input so you can
have phrases in the input field. If you want just a calendar, simply
use the Calendar.setup method and pass it whatever options you want
(flat, flatCallback, inputField).

To disable the input is like cuting off the hands and legs of the
plugin, and I don’t recommend doing such :stuck_out_tongue:

Nathaniel.

On 3/29/07, Conrad T. [email protected] wrote:

// Beware that this function is called even if the end-user only
  // redirect...

You can also checkout all the demos I use to test with here…

using the datetime toolbooks?

1.8.6, Rails 1.2.3, Engines 1.2, and Rake 0.7.2. It took me about 20

Datebocks 2.03. I followed the instructions on
I added ‘include DatebocksEngine’ to both the application and
that doesn’t work with Engines 1.2


Nathaniel Steven Henry Brown

Toll Free: 1-877-446-4647
Vancouver: 604-724-6624

The whole point of the plugin is to extend the date input so you can
have phrases in the input field. If you want just a calendar, simply
use the Calendar.setup method and pass it whatever options you want
(flat, flatCallback, inputField).

To disable the input is like cuting off the hands and legs of the
plugin, and I don’t recommend doing such :stuck_out_tongue:

Nathaniel.

On 3/29/07, Conrad T. [email protected] wrote:

// Beware that this function is called even if the end-user only
  // redirect...

You can also checkout all the demos I use to test with here…

using the datetime toolbooks?

1.8.6, Rails 1.2.3, Engines 1.2, and Rake 0.7.2. It took me about 20

Datebocks 2.03. I followed the instructions on
I added ‘include DatebocksEngine’ to both the application and
that doesn’t work with Engines 1.2


Nathaniel Steven Henry Brown

Toll Free: 1-877-446-4647
Vancouver: 604-724-6624

Hey Nathaniel, this is some very good work. Now, is it possible to to
disable the input field because on an new/edit view screen I would
like them to simply use the calendar to set/change the date?

Thanks,

-Conrad

Hi,

Did you ever get the datebocks working?

I am trying version 3.0.3 with absolutely nothing shing in the
view … the same as you.

Did you fgigure it out.

Thanks
giorgio

hello,
i’m having some strange problem with this new plugin - i just can’t
get it to work with rails 1.2.3 & engine 1.2 =(
“undefined method `toolbocks_date_select’ for #<#Class:0x395ac48:
0x395ac0c>”

although the plugin seems to be loaded correctly:
loading plugin from script/…/config/…/vendor/plugins/
datetime_toolbocks with engine additions
Plugin ‘datetime_toolbocks’: starting load.
Attempting to copy plugin plugin asset files from ‘script/…/config/…/
vendor/plugins/datetime_toolbocks/assets’ to ‘script/…/config/…/
public/plugin_assets’
Plugin ‘datetime_toolbocks’: loaded.

thanks in advance,

dominik

Did you happen to modify the environment.rb file to add the
config.plugins ?

There is a demo app which you can try out just to make sure whatever
environment you are in will work properly.

http://svn.toolbocks.com/demos/datetime_toolbocks/

Nathaniel.

On 3/31/07, [email protected] [email protected]
wrote:

Plugin ‘datetime_toolbocks’: starting load.


Nathaniel Steven Henry Brown

Toll Free: 1-877-446-4647
Vancouver: 604-724-6624

plugin seems to be loaded, since i can open localhost/
datetime_toolbocks, but it can’t find the helper method. strange =(

NoMethodError in Datetime_toolbocks#index

Showing vendor/plugins/datetime_toolbocks/app/views/datetime_toolbocks/
index.rhtml where line #11 raised:

undefined method `toolbocks_date_select’ for #<#Class:0x3cfdc44:
0x3cfdc1c>

just found the problem. forgot to remove the “include DatebocksEngine”
in my application helper.
now it’s running as it’s supposed to be - thanks for this great plugin
=)

On 1 Apr., 09:21, “[email protected]

yes, i’ve added config.plugins in the initializer block as mentioned
in the readme file.

Rails::Initializer.run do |config|
config.plugins = [“engines”, “*”]
end

your demo app is working correctly. any idea why it isn’t working in
my app?