Format Special Dates in DatePicker

2 posts, 0 answers
  1. Alex VonBrand
    Alex VonBrand avatar
    10 posts
    Member since:
    Sep 2008

    Posted 15 Nov 2010 Link to this post

    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
  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 16 Nov 2010 Link to this post

    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>>
  3. DevCraft banner
Back to Top