Agile Web Development

Build it. Launch it. Love it.


DatebocksEngine is a very simple Rails engine which provides a helper method to instantly deploy the Datebocks into your application.

The DatebocksEngine also includes JSCalendar as a subset of functionality. It is in the long term goal to enable this plugin to be able to be used as a whole, or by accessing each part. Whether that is the JSCalendar with a default text input box, advanced Datebocks input without JSCalendar, or with both combined which is currently the default.

This software package is developed using the Engines plugin. To find out more about how to use engines in general, go to for general documentation about the Engines mechanism.


This plugin currently only works with the latest version of the Engines plugin located at:


  1. Create your Rails application, set up your databases, grab the Engines plugin and the DatebocksEngine, and install them.
  2. Install the DatebocksEngine into your vendor/plugins directory
  3. Modify your Engines.start call in config/environment.rb
     Engines.start :datebocks # or :datebocks_engine
  4. Edit your application.rb file so it looks something like the following:
     class ApplicationController < ActionController::Base
       include DatebocksEngine
  5. Edit your application_helper.rb file:
     module ApplicationHelper
       include DatebocksEngine
  6. The DatebocksEngine provides a core stylesheets and in addition to several javascript files, so you’ll need to include these two lines within your application’s layout. Add the following lines:
  <%= engine_stylesheet "datebocks_engine", "calendar-blue" %>
  <%= engine_javascript "datebocks_engine", "calendar", "lang/calendar-en", "calendar-setup" %>


Configuration Options


Once it has been installed, to use the datebocks within your application paste this line into any of your views:

  <%= datebocks ('model', 'date_column') %>

To adjust the default value, set the "@dateField" variable, before using the datebocks helper method.

  <% @model.date_column = '2006-10-11 %>


Please report any bugs or feature enhancements to


License LGPL
Rating (11 votes)
Owner Nathaniel Brown
Created 25 August 2006


  • Danny
    12 November 2006

    it should be datebocks_field and not datebocks for the call

Add a comment