This is a migrated thread and some comments may be shown as answers.

MinValue and MaxValue binding issues

1 Answer 67 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Vadim
Top achievements
Rank 1
Vadim asked on 10 Aug 2015, 09:41 PM

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. 

 

1 Answer, 1 is accepted

Sort by
0
Ivaylo Gergov
Telerik team
answered on 13 Aug 2015, 10:47 AM
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
Tags
DatePicker
Asked by
Vadim
Top achievements
Rank 1
Answers by
Ivaylo Gergov
Telerik team
Share this question
or