DateSplicer =========== DateSplicer adds the Dynarch calendar widget and a date parser to your Rails application as a fully integrated user control. Is a user friendly substitute for date_select field. == Installation & Configuration * Run "script/plugin install date_splicer" from within your application's root * Make sure that you've got the javascript language files (in calendar/lang) for your webapp's locale. Currently Dutch (NL) and English (EN) are supported (please send me translations for your own language and I'll add them to the plugin's repository). * Include javascript files in application.html.erb (language files are selected by looking at current locale): <%= javascript_include_tag "calendar/calendar", "calendar/lang/calendar-parser-#{I18n.locale}", "calendar/lang/calendar-#{I18n.locale}", "calendar/calendar-parser", "calendar/calendar-setup" %> * In your rhtml / erb views, do this: <%= date_splicer :object_name, :method_name %> or this: <% form_for(@account) do |f| %> <%= f.date_splicer :start_date %> ... <% end %> == How Does It Work? In the background, DateSplicer parses your date into three parts (hence the name): object_name[method_name({1,2,3}i)] The default Rails date helpers deploy this mechanism as well. This means DateSplicer is completely transparent to ActiveRecord. There is absolutely no need to adapt your models or controllers to DateSplicer. The widget's javascript files have their language specific settings consolidated in the "lang" directory. == Resources http://date_splicer.solin.eu/ http://datetime.toolbocks.com/ http://www.dynarch.com/projects/calendar/ Example ======= date_splicer :account, :start_date Copyright (c) 2008, 2009 Onno Schuit, released under the MIT license