Published on

While creating I needed to use a Datepicker. I was using the fantastic Twitter Bootstrap framework so I looked for a datepicker that would look as good.

Andrew Rowling’s bootstrap-datepicker was the perfect choice.

So I packaged that project into a ruby gem, ready to use with Rails’ assets pipeline. And thus bootstrap-datepicker-rails was born.

Using it, is as simple as

gem 'bootstrap-datepicker-rails'

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

*= require bootstrap-datepicker

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

//= require bootstrap-datepicker

And then

<input type="text" data-behaviour='datepicker' >

<script type="text/javascript">

And this is how it looks: