# RailsCalendar This gem helps rails applications to display a JQUERY based popup calendar on a text box. The calendar has the option of displaying time as well. The gem uses the timepicker javascript library mentioned in the following website http://trentrichardson.com/examples/timepicker/ uses the Jquery calendar component for selecting date without time. ## Installation Add this line to your application's Gemfile: gem 'rails_calendar' And then execute: $ bundle Or install it yourself as: $ gem install rails_calendar ## Usage Adding as a form tag helper <%= rails_calendar_select_tag("dob", Time.now, :js_options => { :date_range => [2000, 2030], :changeYear => false, :changeMonth => true, :date_format => "dd/mm/yy", :time_format => "hh:mm TT", :time => false }) %> Adding as a form for helper <%= f.rails_calendar_select(:added_on, :js_options => { :date_range => [2000, 2030], :changeYear => false, :changeMonth => true, :date_format => "dd/mm/yy", :time_format => "hh:mm TT", :time => false } )%> Date Time Format h - Hour with no leading 0 hh - Hour with leading 0 m - Minute with no leading 0 mm - Minute with leading 0 s - Second with no leading 0 ss - Second with leading 0 l - Milliseconds always with leading 0 t - a or p for AM/PM T - A or P for AM/PM tt - am or pm for AM/PM TT - AM or PM for AM/PM ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request