Sha256: 68e4329a60b43755ae9239c1a4b228c6f0015a5f0059118faa077516f77bf092

Contents?: true

Size: 1.49 KB

Versions: 2

Compression:

Stored size: 1.49 KB

Contents

= DateTimePicker

A library allows to select date and time, which uses jQuery UI.

== Requirements

You should have +jquery-rails+ gem installed and require +jquery+ and +jquery-ui+ assets (don't forget to require CSS for your jQuery UI).

== Installation

Add this to your Gemfile and run the +bundle+ command

  gem 'date_time_picker'

== I18n

By default plugin includes most using locales and you can require them from your application.js or using the helper, but if you want to add your locales 
or/and change one of them, then just put them into your assets dir.

== Usage

To add necessary assets add into your head

  <%= date_time_picker_assets %>

Or you can add them manually by requiring +date_time_picker+ and +date_time_picker_locale+
  
To use the picker inside the form

  <%= f.date_time_picker :datetime %>

To use it outside the form

  <%= date_time_picker :datetime %>

To specify special options add them into the end

  <%= t.date_time_picker :datetime, :id => 'input_id', :class => [:class_1, :class_2], :ampm => true %>

The full list of available options you can find on the {jQuery UI Datepicker docs}[http://docs.jquery.com/UI/Datepicker] and {jQuery UI Timepicker}[http://trentrichardson.com/examples/timepicker/].

By default plugin uses app locale, but if you want to specify it manually you can do this

  <%= t.date_time_picker :datetime, :locale => :ru %>

Also available

  <%= date_picker :date_only %>

  <%= time_picker :time_only %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
date_time_picker-0.5.2 README.rdoc
date_time_picker-0.5.1 README.rdoc