# Setting weekend background color

I'm making a calendar in LaTeX with tikz-pgf and I would like to set to gray the background color for the weekend. In the examples I found on the Internet and in the documentation, I can see how to setup the foreground color:

if (weekend) [red]


but something like this does not work

if (weekend) [fill=gray]


This is my code:

\begin{tikzpicture}
\calendar(mycal) [dates=2013-09-01 to 2013-09-last,
week list,
month label above centered,
month text=\%mt \%y0
]
if (Sunday) [red]
if (weekend) [fill=gray];

\end{tikzpicture}

-
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks , they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the "code" button (with "{}" on it). –  Marco Daniel Apr 27 '13 at 15:52
I can't find it in the documentation but if (weekend) [nodes={fill=gray}] fills the nodes. –  Mark Wibrow Apr 27 '13 at 19:33
@MarkWibrow This is pretty much the same as if (weekend) [every day/.append style={fill=gray}] as the nodes key just appends its argument to the every node style. –  Qrrbrbirlbel Apr 27 '13 at 19:47
Thanks, this works almost as I need. There is a way to expand the background's width a little bit, so that e.g. both "8" and "23" background's width are the same? –  FloDD Apr 27 '13 at 19:52
@FloDD Have you seen my comment on MarcoDaniel’s answer? You might need to reduce the text width a little bit, because the nodes overlap slightly. –  Qrrbrbirlbel Apr 27 '13 at 19:56

@everyone Solved in this way:

\begin{tikzpicture}
\calendar [dates=2013-09-01 to 2013-09-last,
week list,
month label above centered,
month text=\%mt \%y0
]
if (Sunday) [red]
if (weekend) [nodes={fill=black!20,minimum size=1.7em}];
\end{tikzpicture}
`
-