Index: lib/calendar_helper.rb =================================================================== --- lib/calendar_helper.rb (revision 194) +++ lib/calendar_helper.rb (working copy) @@ -22,7 +22,13 @@ # Use (0..2) for the first three letters, (0..0) for the first, and # (0..-1) for the entire name. # :first_day_of_week => 0 # Renders calendar starting on Sunday. Use 1 for Monday, and so on. - # + # :accessible => true # Turns on accessibility mode. This suffixes dates within the + # # calendar that are outside the range defined in the
| #{Date::MONTHNAMES[options[:month]]} | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| #{d[options[:abbrev]]} | "} + cal << %(#{Date::MONTHNAMES[options[:month]]} | ||||||||
| #{d[options[:abbrev]]} | " + else + cal << "#{d[options[:abbrev]]} | " + end + end cal << "||||||||
| #{d.day} | ) + if options[:accessible] + cal << %(">#{d.day} #{Date::MONTHNAMES[d.month]}) + else + cal << %(">#{d.day}) + end end unless first.wday == first_weekday first.upto(last) do |cur| cell_text, cell_attrs = block.call(cur) @@ -99,7 +116,11 @@ (last + 1).upto(beginning_of_week(last + 7, first_weekday) - 1) do |d| cal << %(#{d.day} | ) + if options[:accessible] + cal << %(">#{d.day} #{Date::MONTHNAMES[d.mon]}) + else + cal << %(">#{d.day}) + end end unless last.wday == last_weekday cal << "||||||||