Skip to content

Comments

Enabled other month cell text and attributes to be changed with block parameter.#31

Open
lkol wants to merge 1 commit intotopfunky:masterfrom
lkol:master
Open

Enabled other month cell text and attributes to be changed with block parameter.#31
lkol wants to merge 1 commit intotopfunky:masterfrom
lkol:master

Conversation

@lkol
Copy link

@lkol lkol commented Sep 27, 2013

Modified the helper to allow setting the cell text or the attributes for the previous or next month with a block.

The code below used to only affect the current month, not the other months' cells (with a class "otherMonth" be default):

calendar(:year => 2005, :month => 5) do |d|
    [d.mday, {:class => "myCustomClass"}]
end

After this change, also other months' cells can be customized with the block.

@sgreenfield
Copy link

+1 This should be merged.

@sidereel-dev
Copy link

Thank you for this, saved a bunch of time

@lkol
Copy link
Author

lkol commented Mar 11, 2014

My pleasure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants