Simple Form Bootstrap Datepicker
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
- Fork it ( https://github.com/arian-amador/biostars-api/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request