|
Rank: Member Groups: Member
Joined: 9/1/2010 Posts: 28
|
I am using the calendar control and all is working fine so far.
But, I need to be able to "highlight" multiple days in a month to indicate there are schedule items on those days. I tried using
Calendar1.SelectedDates.Add(DateTime.Now.AddDays(5)); Calendar1.SelectedDates.Add(DateTime.Now.AddDays(6)); Calendar1.SelectedDates.Add(DateTime.Now.AddDays(7)); Calendar1.SelectedDates.Add(DateTime.Now.AddDays(8));
but the days in the calendar to not have a box or are highlighting on those days.
Not sure what I am doing wrong. I also could not find the SelectedDateStyle property thinking that was why it was not showing.
Thanks for your help.
<eo:Calendar ID="Calendar1" runat="server" ControlSkinID="Outlook2003" DisabledDates="" SelectedDates="2011/05/18" AutoPostbackOnSelect="true" TitleVisible="true" MonthSelectorVisible="true" WeekSelectorVisible="true" OnSelectionChanged="Calendar1_SelectionChanged"> </eo:Calendar>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Your code is correct. We verified the same code and it works fine here.
Thanks
|
|
Rank: Member Groups: Member
Joined: 9/1/2010 Posts: 28
|
Had a small error. I see it working now. Have another question regarding SelectedDates. When I actually click on day it clears all the other SelectedDates.
Is there a way to have the SelectedDates cleared only if I clear them or do I need to "re-select" them each time the user selects one of the days.
thx
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
This is no way to prevent SelectedDates to be cleared when user selects a single date. If you wish a date to appear differently regardless user action, you can use custom rendering by handling DayRender event. That would not have anything to do with SelectedDate/SelectedDates or any of the style property. Instead you will be generating the output for each day cell and you can render any HTML/style you like there.
Thanks
|
|