Multiple Date Selection Binding

4 posts, 0 answers
  1. Tarik
    Tarik avatar
    12 posts
    Member since:
    May 2015

    Posted 03 Aug 2015 Link to this post

    Hello, i am using RadCalendar and i have to bind (in two way) multiple selected dates with an observable collection existing in my ​View​Model, the SelectedDate property is currently bound to just one date.

    Regards.

  2. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 04 Aug 2015 Link to this post

    Hello Tarik,

    What I can suggest you would to check this forum post where you would be able to find more details regarding the SelectedDates property of RadCalendar. In the post there is also link to a blog post demonstrating how to achieve that using an attached property.

    Hope this helps.

    Regards,
    Kalin
    Telerik
    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. UI for WPF is Visual Studio 2017 Ready
  4. Tarik
    Tarik avatar
    12 posts
    Member since:
    May 2015

    Posted 04 Aug 2015 in reply to Kalin Link to this post

    Hello, First let me thank you for your quick answer, and that's resolve a big part of the problem we had.

    I would like to ask you how to catch previous and next month arrows actions without working with CodeBehind, (i am using MVVMLight to catch other events and bind them to commands.

    <i:Interaction.Triggers>
          <i:EventTrigger EventName="...">
                  <mvvm:EventToCommand Command="{Binding OneCommand}" />
          </i:EventTrigger>
    </i:Interaction.Triggers>

  5. Kalin
    Admin
    Kalin avatar
    1209 posts

    Posted 05 Aug 2015 Link to this post

    Hello Tarik,

    I'm glad the suggestion helped. As for the other question, what I can suggest you would be to use the DisplayDate property of RadCalendar and bind it to a property in the ViewModel. The property changes when navigating with the arrows as well as when selecting a date - so you would need to check whether the previous value was from the same month in order to know when the user navigates.

    Hope this helps.

    Regards,
    Kalin
    Telerik
    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
Back to Top