-
{Email}[paul at tymate.com]
<img src=“https://badge.fury.io/rb/simple-form-datepicker.png” alt=“Gem Version” />
Provides an easy to use date picker for SimpleForm.
-
Easy to use.
-
Localizable with I18n and I18n-js.
require 'simple-form-datepicker'
= f.input :date_attribute, :as :datepicker
//= require jquery.ui.all
or
//= require jquery.ui.datepicker
Also load localisations for JQueryUI’s datepicker:
//= require jquery.ui.datepicker-en //= require jquery.ui.datepicker-es //= require jquery.ui.datepicker-fr
Initialize JQueryUI’s datepicker:
$("input.datepicker").each(function(input) { $(this).datepicker({ dateFormat: "yy-mm-dd", altField: $(this).next() }) // If you use i18n-js you can set the locale like that $(this).datepicker("option", $.datepicker.regional[I18n.currentLocale()]); })
*= require jquery.ui.datepicker
-
simple_form
-
JqueryUI / jquery-ui-rails
-
How to use with i18n-js.
$ gem install simple-form-datepicker
Copyright © 2013 Paul d’Hubert
See LICENSE.txt for details.