0.0
No commit activity in last 3 years
No release in over 3 years
Datepicker wrapper for simple form.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.14
~> 10.0
~> 3.0

Runtime

 Project Readme

DateWrapper

Date wrapper is a simple form integration of gem bootstrap-datepicker-rails. With a simple form wrapper :date.

Installation

Add this line to your application's Gemfile:

gem 'date_wrapper'

And then execute:

$ bundle

Or install it yourself as:

$ gem install date_wrapper

Setup dependencies

  • bootstrap
  • font-awesome-rails
  • simple_form

In application.scss

@import 'date_wrapper';

This will @import 'bootstrap-datepicker3'; for you.

In application.js

//= require date_wrapper

This will //= require bootstrap-datepicker for you.

Usage

Given a date field named date use the following in simple form:

<%= f.input :date, as: :string, wrapper: :date, input_html: {value: I18n.l(f.object.date)} %>

Generate stylesheets

If you want to customize the stylesheets.

$ rails g date_wrapper:stylesheets

Generate javascripts

If you want to customize the javascripts.

$ rails g date_wrapper:javascripts