Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Home

tschmidt edited this page · 9 revisions
Clone this wiki locally

Ok, so I was looking around the internets for a calendar solution and while I found some that had features I was looking for, none of them seemed to do what I wanted (or they didn’t do it very easily). After wrestling with this I decided what the hell, I will just build my own. So the idea for NiftyCal was born.

Options, options, options

One of the biggest issues that I had with most of the solutions out there is the lack of control over the resulting calendar. I kept finding that I would want to add or remove or prevent certain aspects of the calendar depending on the situation. Because of this I made the conscious decision to give you, the user, the ability to modify the options for the calendar. Here for your viewing pleasure are the options that are acceptable when you build the calendar.

Option Purpose Default
:table_class Sets the class for the calendar table ‘calendar’
:this_month_class The class that is set for the ‘td’ containing dates that belong in the current month ‘currentMonth’
:other_month_class The class that is set for the ‘td’ containing dates that are not part of the current month ‘otherMonth’
:day_name_class The class that is set for the ‘th’ containing the name for the day of the week (e.g. Sunday, Monday, etc) ‘dayName’
:day_class This class is set for any ‘td’ element that contains a date that occurs during the standard business week (Monday – Friday ‘dayName’
:weekend_day_class This class is set for any ‘td’ element that contains a date that occurs on a weekend ‘weekendDay’
:title_class The class that is set for the tables title, which is an ‘h2’ element ’calendar_title
:title_text Specifies the title for the calendar, if set to nil or ’’ then the title will not appear on the calendar CurrentMonth CurrentYear (e.g. November 2008)
:include_weekends Specifies whether weekends are displayed on the calendar true
:abbrev Sets the abbreviation for the day names on the calendar (e.g. Sun, Mon, Tue, etc) (0..2)
:show_today Specifies whether or not to mark ‘Today’ on the caledar true
:start_date Specifies what day the calendar should start on (must be a Date object) Date.today.beginning_of_month
:end_date Specifies what day the calendar should end on (must be a Date object) Date.today.end_of_month
Something went wrong with that request. Please try again.