Denaes Posted May 1, 2004 Posted May 1, 2004 I see an array of dates for bolded dates. Is there any such way to instead make certain dates Red and others Green? I need to show users which dates aren't allowed to be chosen (red) and which they have chosen (green). I could do it with bold dates being illegal and a listbox of chosen dates, but thats a waste of space. Any clue on this? Quote
LostProgrammer Posted May 5, 2004 Posted May 5, 2004 There is a DayRender event that fires when each day is printed in the calendar. If you know the dates, store them in an array, and in the DayRender event, check for the eventArgs.Day.Date. What I did was to define a Style and then apply it to the days I wanted. For example Dim vacStyle As New Style() vacStyle.ForeColor = System.Drawing.Color.Red eventArgs.Cell.ApplyStyle(vacStyle) That shoud do it. Oh Yeah, the event args are DayRenderEventArgs) Hope this helps. -lp Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.