MinValue and MaxValue binding issues

2 posts, 0 answers
  1. Vadim
    Vadim avatar
    6 posts
    Member since:
    Apr 2011

    Posted 10 Aug 2015 Link to this post

    I've been working on a universal application (targeting Windows Phone) that uses RadDatePicker for selecting the date range.

     There are two date pickers on a form for Start and End date respectfully...

    Typical scenario: Selecting the start date should prevent user from selecting the end date that is less than the selected start date.

     

    SampleCode:

    <RadDatePicker x:Name="StartDatePicker" Header="start date" />

    <RadDatePicker x:Name="EndDatePicker" Header="end date" MinValue={Binding ElementName=StartDatePicker, Path=Value, Mode=OneWay}" />

     

    Selecting the Start date for the first time, changes the min value of the End date. However the issues is that when changing the start date again, it does not change the min value for end date picker to a new value.

     

    I could not get the MinValue to change the value more than one time, even through my binding Mode is set to "OneWay"

     

    I've tried via binding values to the property of the view model first (with proper notify property change events), which did not work, so I came up with this scenario as a simplest way to reproduce this problem. 

     

  2. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 13 Aug 2015 Link to this post

    Hi,

    Thank you for contacting us.

    I was able to reproduce this issue and I will log it in our bug tracking system. For now, as a workaround you can change the MinValue of the EndDatePicker each time the value of the StartDatePicker has chagned using the ValueChanged event.

    Sorry for any inconvenience caused.

    Regards,
    Ivaylo Gergov
    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