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
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
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.
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
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.
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.
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?
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.
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.