No commit activity in last 3 years
No release in over 3 years
This gem provides bootstrap-timepicker.js and bootstrap-timepicker.css for your Rails 3, 4 and 5 application.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.0
>= 0

Runtime

< 6.0, >= 3.1
 Project Readme

Bootstrap::Timepicker::Rails::Addon

This is the GEMified version of bootstrap-timepicker

bootstrap-timepicker-rails-addon project integrates Timepicker for Twitter Bootstrap 3 with Rails 3, 4 and 5 assets pipeline.

Installation

Add this line to your application's Gemfile:

  1. if you used Bootstrap 3 version,
    gem 'bootstrap-sass', '~> 3.3.7'
    gem 'bootstrap-timepicker-rails-addon', '~> 0.5.1'
  1. if you used Bootstrap 2 version,
    gem 'bootstrap-sass', '~> 2.3.2.0'
    gem 'bootstrap-timepicker-rails-addon', '0.3.0'

Or you can install from latest build(only support Bootstrap 3 version in master branch):

gem 'bootstrap-sass', '~> 3.3.7'
gem 'bootstrap-timepicker-rails-addon', :require => 'bootstrap-timepicker-rails-addon',
                                        :git => 'git://github.com/ywjno/bootstrap-timepicker-rails-addon.git'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bootstrap-timepicker-rails-addon

Usage

Add this line to app/assets/javascripts/application.js

//= require bootstrap-timepicker

Add this line to app/assets/stylesheets/application.css.scss

@import "bootstrap-timepicker";

Just call timepicker() with any selector in view.

$('#timepicker').timepicker();

And here is the html code sample.

<div class="input-group bootstrap-timepicker timepicker">
  <input id="timepicker1" type="text" class="form-control input-small">
  <span class="input-group-addon"><i class="glyphicon glyphicon-time"></i></span>
</div>

Please view the bootstrap-timepicker demos & documentation.

Contributing

  1. Fork it
  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 new Pull Request