Rails plugin handling text_field date input for datetime fields
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
LICENSE.txt
README.textile
init.rb

README.textile

date_column

written by Jens Kraemer (jk@jkraemer.net)

Examples


  1. this will create a start_date_value virtual attribute for use with a text
  2. field in your forms.
    date_column :start_date
  1. we usually want an end date entered by the user to be part of the time span.
  2. So it’s a good idea to store the beginning of the next day internally. This
  3. is transparently handled by the :offset option.
  4. :default is eval’d if present to initialize the text field when displaying a
  5. record with an empty end_date field.
    date_column :end_date, :offset => 1.day, :default => ‘1.month.from_now’

Todo

support for other date formats than ‘dd.mm.yyyy’