Hi.
In our application we use the XamDateTimeEditor with the InvalidValueBehavior set to RevertValue which works fine and we have a data trigger that listens to the IsValidValue to set the border to red whenever the value is not value. Also works fine.
However there seems to be an issue when reverting and setting the property IsValidValue back to true.
I've provided a sample project. The steps to recreate the issuse are as follows:
1. Double click in the XamDateTimeEditor to select all the text.
2. Enter a number to make the input invalid - the border will become red.
3. Press escape.
4. Notice that the border is still red even though the entered value is valid (and snooping the control shows the property IsValidValue is indeed false).
If you delete all the values via backspace or delete key without selecting the entire text - pressing escape will revert to the original value and correctly set the IsValidValue to true - reverting the border color back to normal.
Thanks for the help!
XamDateTimePicker.zip
Hello Nathan,
I have been investigating into the behavior you are seeing, and I have reproduced it. It appears that in some situations, you are correct in that the IsValidValue property of the control is not being reverted with the value, even though the value of the control is valid.
This appears to be an issue with the internal logic of the control, and as such, I have asked our engineering teams to investigate further. In order to ensure this will receive attention, I have logged this behavior in our internal tracking systems with a development ID of 267709. I have also created a private support case on your behalf for this behavior that I will be linking this issue to so that you can be notified when a resolution or other change happens to this issue. This support case has an ID of CAS-205513-H5C1M0 and you can access it here.
Please let me know if you have any other questions or concerns on this matter.