This is a migrated thread and some comments may be shown as answers.

[Solved] .FocusedDate not updating control

1 Answer 141 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
topry
Top achievements
Rank 1
topry asked on 03 Apr 2009, 10:32 PM
I resolved my original .FocusedDate issue- was trying to set it server side in RadDateInput _TextChanged event. Changed it to client side.

Is it possible to bold individual days within a month (not selecting them)?
The goal is to indicate which days of the months have appointments scheduled.
When the user changes months, I make a database query returning dates within the month that have appointments scheduled and need to bold/highlight those dates for the user.

Only method I have found is to use the SelectedDates collection, but when the user clicks on one of these dates it has the effect of 'un-selecting it'. Which leaves me with constantly adding/removing items from the collection within the serverside _SelectionChanged event.

Is there a better way to do this?


 

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 06 Apr 2009, 08:49 AM
Hi,

I guess adding SpecialDays for RadDatePicker's calendar is better option for achieving this.

ASPX:
 
<telerik:raddatepicker id="RadDatePicker1" runat="server" Skin="Default" SelectedDate="2009-04-06">  
    <DateInput runat="server" Width="150px">  
    </DateInput>              
</telerik:raddatepicker> 

CS:
 
protected void Button2_Click(object sender, EventArgs e)  
{  
    RadCalendarDay specialDay = new RadCalendarDay(RadDatePicker1.Calendar);  
    specialDay.Date = DateTime.Today;  
    specialDay.ItemStyle.BackColor = System.Drawing.Color.LimeGreen;  
    RadDatePicker1.Calendar.SpecialDays.Add(specialDay);          

Checkout these links for more information about SpecialDays;
Calendar / Special Days
RadCalendarDay Collection Editor

Thanks,
Shinu.
Tags
Calendar
Asked by
topry
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or