Plugins - datepicker_engine
Add to favoritesDatepickerEngine
DatepickerEngine is a collection of helpers for creating datepicker boxes in your views.
Installation
- Create your Rails application, set up your databases, grab the Engines plugin and the DatepickerEngine, and install them.
- Install the DatepickerEngine into your vendor/plugins directory
- Modify your Engines.start call in config/environment.rb
Engines.start :datepicker # or :datepicker_engine
- Edit your application.rb file so it looks something like the following:
class ApplicationController < ActionController::Base include DatepickerEngine end
- Edit your application_helper.rb file:
module ApplicationHelper include DatepickerEngine end
- The DatepickerEngine provides a default stylesheet and a small javascript
helper file, so you’ll probably want to include the former and almost
certainly the latter in your application’s layout. Add the following
lines:
<%= engine_stylesheet "datepicker_engine", "calendar-blue" %> <%= engine_javascript "datepicker_engine", "calendar", "lang/calendar-en", "calendar-setup" %>
Usage
You can create a datepicker popup box like this:
<%= datepicker_popup ‘person’, ‘birthday’,
{ :class => 'date',
:field_title => 'Birthday',
:button_title => 'Show calendar' },
{ :firstDay => 1,
:range => [1920, 1990],
:step => 1,
:showOthers => true,
:cache => true }
%>
More examples in the API docs for the application helper
License
Copyright © 2006 Gitte Wange
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.

i got the same problem :(