Simple Form Bootstrap Datepicker

Gem Version

Adds a bootstrap date picker for Simple Form.

Includes support for Bootstrap, FontAwesome, and Foundation icon libraries used in the bootstrap input group.

Requirements

Optional

Installation

Add it to your Gemfile:

gem 'simple_form_bootstrap_datepicker'

Run the following command to install it:

bundle install

Run the generator:

rails generate simple_form_bootstrap_datepicker:install

Usage

<%= simple_form_for @user do |f| %>
  <%= f.input :start_date, as: :date_picker, wrapper: date_picker, input_html: {icon: :bs} %>
  <%= f.button :submit %>
<% end %>

A default placeholder is added mm/dd/yyyy if one is not specified. There are currently three icon libraries which can be specified with :bs for bootstrap, :fa for font-awesome, and :fi for foundation. If an icon library isn't specified then a default Date will be added the icon section.

Contributing

  1. Fork it ( https://github.com/arian-amador/biostars-api/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request