public
Description: GIT upload of dhtml-calendar from http://dry.4thebusiness.com
Homepage: http://dry.4thebusiness.com
Clone URL: git://github.com/ewildgoose/dhtml-calendar.git
name age message
file README Wed Sep 26 07:35:30 -0700 2007 Update Readme. git-svn-id: http://dhtml-calend... [Edwin Moss]
file environment.rb Wed Sep 26 07:33:44 -0700 2007 Renamed localize_date_format to dhtml_db_date_f... [Edwin Moss]
file init.rb Fri Jun 22 09:49:54 -0700 2007 Moving latest plugin to trunk. git-svn-id: htt... [Edwin Moss]
file install.rb Fri Jun 22 09:49:54 -0700 2007 Moving latest plugin to trunk. git-svn-id: htt... [Edwin Moss]
directory lib/ Thu Oct 04 09:56:11 -0700 2007 Fixed PostgreSQL, by giving it the expected Tim... [Edwin Moss]
directory public/ Mon Aug 06 21:48:36 -0700 2007 Fixed too much recursion bug in calendar.js Fi... [Edwin Moss]
directory tasks/ Sat Nov 04 21:31:08 -0800 2006 Initial files git-svn-id: http://dhtml-calenda... [Edwin Moss]
directory test/ Sat Nov 04 21:31:08 -0800 2006 Initial files git-svn-id: http://dhtml-calenda... [Edwin Moss]
README
= DhtmlCalendar

DhtmlCalendar is a plugin

== Installation

1. Create your Rails application, set up your databases, grab the DhtmlCalendar plugin, and install it.

2. Install the DhtmlCalendar into your vendor/plugins directory

  ruby script/plugin install http://dhtml-calendar.googlecode.com/svn/trunk

  or 

  cd vendor/plugins
  svn co http://dhtml-calendar.googlecode.com/svn/trunk

3. Add the following line to your application's layout:

   <%= dhtml_calendar_includes %>

== Usage
To use this plugin

Note: :form_name is optional unless your form is named. If it is named then supply 
  the name of the form.


 <%= popup_calendar 'person', 'birthday',
       { :class => 'date',
         :field_title => 'Birthday',
         :button_image => 'calendar.gif',
         :form_name => 'form_name',
         :button_title => 'Show calendar' },
       { :firstDay => 1,
         :range => [1920, 1990],
         :step => 1,
         :showOthers => true,
         :cache => true }
 %>
or
 <%= calendar 'person', 'birthday',
      { :form_name => form_name,
      :class => 'date' },
      { :firstDay => 1,
      :range => [1920, 1990],
      :step => 1,
      :showOthers => true }
 %>
or
 <%= calendar 'person', 'birthday',
       { :class => 'date',
         :form_name => 'form_name'},
       { :firstDay => 1,
         :range => [1920, 1990],
         :step => 1,
         :showOthers => true }
 %>
or 
 <%= calendar_field 'person', 'birthday',
       { :class => 'date',
         :date => value,
         :field_title => 'Birthday',
         :form_name => 'form_name',
         :button_title => 'Show calendar' },
       { :firstDay => 1,
         :range => [1920, 1990],
         :step => 1,
         :showOthers => true,
         :cache => true }
 %>
or
 <%= calendar_select 'person', 'birthday',
       { :class => 'date',
         :date => value,
         :field_title => 'Birthday',
         :form_name => 'form_name',
         :button_title => 'Show calendar' },
       { :firstDay => 1,
         :range => [1920, 1990],
         :step => 1,
         :showOthers => true,
         :cache => true }
 %>
or
 <%= calendar_box 'person', 'birthday',
       { :class => 'date',
         :date => value,
         :field_title => 'Birthday',
         :form_name => 'custform',
         :button_title => 'Show calendar' },
       { :firstDay => 1,
         :range => [1920, 1990],
         :step => 1,
         :showOthers => true,
         :cache => true }
 %>

You can control the format stored in the DB via (default value is '%Y-%m-%d'):

  ActiveRecord::Base.dhtml_db_date_format = '%Y-%m-%d'

To use with ActiveScaffold either include the following in your ApplicationHelper:

def active_scaffold_input_date(column, options)
  active_scaffold_calendar(column, options)
end

or set the form_ui to calendar:

  config.columns[:held_on].form_ui = :calendar
  
== UPDATES

Added DateBox/DateBocks:
  :sub_type => :select
               :box
               :field
               :popup
               :flat
               :field

== License
Copyright (c) 2006 4ssoM LLC <ed.moss.info@mac.com>

The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.