[ANN] DateboxEngine Plugin

Based on my previous work with making the Intuitive Date Input
Selection,
called DateBox. I have since created a very simple Engine which
abstracts
all the code, images, JavaScript, CSS, and the like within an engine
sandbox.

I may as well say this now, before the opinions come in. Some may
disagree
with this being an Engine, or the fact that it is “overkill”. I
obviously
disagree with this statement based on my decision to use an engine. My
reasoning is based on the functionality achieved using the Engine’s
ability
to leverage the sandbox for images, StyleSheets, and JavaScript files.
The
DateBox engine does also extend the base helper to provide a “date_box”
method which can be used within your views.

As new versions are released extending the functionality and adding new
functionality outlined on the WishList at http://datebox.inimit.com,
upgrading will simply require a svn up (if you installed with the -x
flag),
and a restart of your application to initialize the copying of all the
datebox_engine /public files within its sandbox in the global /public
directory.

To install, ensure that you are using the latest branches of engines or
edge_engines, and type the following:
script/plugin install [-x] datebox_engine

You can view the full readme at:
http://opensvn.csie.org/rails_engines/plugins/datebox_engine/README

You can see a working demo of DateBox at http://datebox.inimit.com

As mentioned, there are a growing number of WishList features have been
collecting. For those that are motivated, patches would gladly be
welcomed
to help further enhance this project :slight_smile:

Look forward to hearing your feedback.

Regards,
Nathaniel.

 Nathaniel S. H. Brown                           http://nshb.net

Really good!

One thing though: the date depends on the date set on the user’s
computer. So I you have a wrong date on your computer, and enter “tod”
you get the wrong date. It would be nice to set a “now” parameter from
the server, so the server time/date will be used instead of the client’s
time/date.

Jules

Hey Jules,

I have this on the WishList at http://datebox.inimit.com

“Initial date validation with server side code (Ruby/PHP/etc) to ensure
that
the base date used via their time zone is correct.”

  • Nb
 Nathaniel S. H. Brown                           http://nshb.net

Very nice. I tried out the universal index page. Works great on FIrefox.
IE
6 helpfully blocks it (requires user to go through accept dialog) and
doesn’t open that nice calendar image by default. Is IE’s problem due to
the
pop-up form of the calendar? The flat Dynarch calendar doesn’t activate
IE’s
alert.
Thanks for sharing this,
Bill

On 2/10/06, Greg F. [email protected] wrote:

Greg
I have been experiencing the exact same problem. Any
updates/workarounds?

The error you are likely seeing is not that the datebox is undefined,
it’s
probably the:

undefined method `engine_image’

Which is contained within the datebox method. That method requires the
edge
version of the engines. You can verify that you are on edge by checking
the
lib/action_view_extensions.rb for the method engine_image.

http://opensvn.csie.org/rails_engines/engines/branches/edge/lib/action_view_
extensions.rb

I just checked in the repository, and it’s there. So that likely means
you
didn’t check out the latest branch.

You do need to install the core engines plugin, which is mentioned in
step
1.

script/plugin install [-x]
http://opensvn.csie.org/rails_engines/engines/branches/edge/

-Nb

 Nathaniel S. H. Brown                           http://nshb.net

The error you are likely seeing is not that the datebox is undefined,
it’s
probably the:

undefined method `engine_image’

Which is contained within the datebox method. That method requires the
edge
version of the engines. You can verify that you are on edge by checking
the
lib/action_view_extensions.rb for the method engine_image.

http://opensvn.csie.org/rails_engines/engines/branches/edge/lib/action_view_
extensions.rb

I just checked in the repository, and it’s there. So that likely means
you
didn’t check out the latest branch.

You do need to install the core engines plugin, which is mentioned in
step
1.

script/plugin install [-x]
http://opensvn.csie.org/rails_engines/engines/branches/edge/

-Nb

 Nathaniel S. H. Brown                           http://nshb.net

A co-worker has been trying to get this to work this morning.

She keeps getting date_box undefined. Obviously she followed the
instructions in the readme.

We are using the latest released Engine Plugin. Is that new enough or
does the DataBoxEngine require functionality from the svn or edge
version of the Engine Plugin?

Thanks
Greg

On 1/21/06, Nathaniel S. H. Brown [email protected] wrote:

DateBox engine does also extend the base helper to provide a “date_box”
edge_engines, and type the following:

Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


Greg F.
The Norcross Group
Forensics for the 21st Century

Great work ! This is very nice. Howabout validations ? February 31st,
for
example, isn’t on the Calendar, but you’re able to enter it into the
field
manually. Could you possibly do dynamic validations on complete dates,
and
push an entry like February 31st back to February 28th ?

The error you are likely seeing is not that the datebox is undefined,
it’s
probably the:

undefined method `engine_image’

Which is contained within the datebox method. That method requires the
edge
version of the engines. You can verify that you are on edge by checking
the
lib/action_view_extensions.rb for the method engine_image.

http://opensvn.csie.org/rails_engines/engines/branches/edge/lib/action_view_
extensions.rb

I just checked in the repository, and it’s there. So that likely means
you
didn’t check out the latest branch.

You do need to install the core engines plugin, which is mentioned in
step
1.

script/plugin install [-x]
http://opensvn.csie.org/rails_engines/engines/branches/edge/

-Nb

 Nathaniel S. H. Brown                           http://nshb.net

It actually flows over into the next month presently.

So if you type Feb 31st, it should rollover to be March 3. Going back is
an
interesting concept though. There is bug similar to this, which this may
actually serve as a solution for.

-Nb

 Nathaniel S. H. Brown                           http://nshb.net