I’ve just had my first patch accepted on an open source project. Quite chuffed with that! As of this weekend, the Rails
calendar_helper plugin is now at version 0.21. My changes are very minimal, and only really to do with the markup.
Firstly, the default table markup’s had an overhaul. The date now goes into a
%lt;caption> tag, outside the
<thead>, as is appropriate. The
<th>‘s in the
thead now have
scope="col" applied to them, again, as is appropriate.
The only other change is optional. If you pass in an option of
:accessible => true, any dates in the grid which fall outside the current month will have
<span> class="hidden"> monthName</span> appended to them. It could be reasonably inferred that plain numbers are dates that relate to the caption of the table, but the numbers outside the current month should probably be clarified.
You can come up with your own method of hiding content marked as
.hidden; at NPG, we use the following:
but really, use whatever you’re most comfortable with.
You can get the plugin from Geoffrey Grosenbach’s subversion:
via the usual Rails plugin installation method.