Highlight time period according to a collection of TimeSpan

2 posts, 0 answers
  1. Marco
    Marco avatar
    4 posts
    Member since:
    May 2013

    Posted 21 May 2013 Link to this post

    Hello,

    I am new to Telerik and have trouble to make timepicker finish my work. Here is my requirements:

    I have a collection of TimeSpan and want the timepicker highlight time periods containing these TimeSpan's. For example:
    I have 13:00, 14:15 and 16:30 in my collection. I hope that timepicker will highlight just 13:00, 14:00 and 16:00 and keep other hour stay grey when the timepicker control is active.

    Thanks in advance!

    -Marco
  2. Ivo
    Admin
    Ivo avatar
    390 posts

    Posted 27 May 2013 Link to this post

    Hi Marco,

    In order to achieve this behavior I would suggest you to create a new StyeSelector for the clock part of the RadTimePicker that sets a non-selectable style if a TimeSpan is not part of a give collection. I prepared a sample project that demonstrates this approach.

    Regards,
    Ivo
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top