0.0
No commit activity in last 3 years
No release in over 3 years
Extends Rails application of calendar view
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

>= 3.0.0
 Project Readme

Introduction

Calendar view is a rails plugin which extends application of calendar views. Got to this page to see samples.

Requirements

Plugin was built as Rails 3 Engine plugin.

Usage

Gemfile

Add to Gemfile of application:

gem "calendar_view"

than

bundle install

to install gem.

Stylesheets

There are two themes current available:

  • olive
  • bootstrap

In Rails 3 app add import directive to Your SCSS/SASS file:

@import "calendar_view_bootstrap_theme"

or

@import "calendar_view_olive_theme"

You can also customize public/stylesheets using above themes.

Views

In views of Your application add:

<%= calendar_window(:back=>10,:forward=>20) %>
<% 1.upto(6) do |i| %>
<%=  calendar_square(:month=>i,:highlight_between => Date.new(2011,9,19)..Date.new(2011,9,25)) %>
<% end %>
<%= calendar_square %>
<%= calendar_square(:month_delta=>-12,:year_delta=>-1) %>
<%= calendar_square(:month_delta=>12) %>
<%= calendar_square(:month=>12,:highlight_date => Date.new(2011,12,2)) %>
<%= calendar_square(:month=>1,:first_wday=>0) %>
<%= calendar_square(
                   :month => 1,                                                    # month
                   :year => 2011,                                                  # year
                   :month_delta => -1,                                             # relative to month
                   :year_delta => -2,                                              # relative to year
                   :first_wday => 0,                                               # start of week 0 - Sunday, 1 - Monday
                   :highlight_date => Date.new(2011,12,2),                         # highlight specific day
                   :highlight_day => 2,                                            # highlight specific day
                   :highlight_month => 12,                                         # highlight specific day
                   :highlight_year => 2011,                                        # highlight specific day
                   :highlight_between => Date.new(2011,12,1)..Date.new(2011,12,10) # highlight range of days
                   ) %>