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

Format Special Dates in DatePicker

1 Answer 65 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Alex VonBrand
Top achievements
Rank 1
Alex VonBrand asked on 15 Nov 2010, 09:39 PM
Hi,

I have an application that manages events.  The users would like to see the dates for existing events   highlighted in the datepicker calendar.
In the datepicker in the asp controls, this is easy using the special days collection.   I can also add tool tips to special days programmatically.

I cannot find any way to achieve this functionality with the silverlight datepicker.  Does anyone know if this is possible?  and if possible, how?

Thanks,
Alec von Brand

1 Answer, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 16 Nov 2010, 08:24 AM
Hi Alex VonBrand,

You can create a DayTemplateSelector and apply it to the Calendar of RadDatePicker using the CalendarStyle property:


<
telerik:RadDatePicker.CalendarStyle>
           <Style TargetType="telerik:RadCalendar">
              <Setter Property="DayTemplateSelector" Value="{StaticResource MyEventTemplateSelector}" />
           </Style>                                                   </telerik:RadDatePicker.CalendarStyle>

In this template selector you can provide two or more DataTemplates for days which are special.

You can see this approach in action in our online examples. Please, check Calendar FirstLook example and Calendar DatePicker example.



Greetings,
Dani
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
Tags
DatePicker
Asked by
Alex VonBrand
Top achievements
Rank 1
Answers by
Dani
Telerik team
Share this question
or