Styling today's date

3 posts, 0 answers
  1. ProXy
    ProXy avatar
    3 posts
    Member since:
    Apr 2010

    Posted 11 Sep 2015 Link to this post


     I would like to extend the Calendar control to add the SpecialDays-Feature. I was able to override the SelectTemplate function and return two different DataTemplates. I also added a list of dates to the control, all those days are shown bold red in the calendar. This works fine if IsTodayHighlighted is set to false - whenever I enable this feature, the style of my SpecialDay-Feature is overwritten. How can I modifiy the style of the today field, based on the list that is bound to the control?


    Thanks in advance

  2. Nasko
    Nasko avatar
    727 posts

    Posted 15 Sep 2015 Link to this post

    Hello Stefan,

    The observed by you behavior is probably caused by the implemented logic inside your SelectTemplate method. When the IsTodayHighlighted property is set to True the ButtonType of the button is set to CalendarButtonType.TodayDate and if inside the SelectTemplate you do not have any implemented logic for that type of buttons no template will be applied.

    Please, check the attached sample project that demonstrates how a template gets applied when IsTodayHighlighted is to True implementing some logic for handling CalendarButtonType.TodayDate ButtonTypes.

    We hope this will help you.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. ProXy
    ProXy avatar
    3 posts
    Member since:
    Apr 2010

    Posted 16 Sep 2015 in reply to Nasko Link to this post

    Hello Nasko,


    thank you for the answer. You were completely right, I missed the ButtonType TodayDate.




Back to Top