I tried to cancel the date/time change inside of the ValueChanged event due to some logic. Since I need to set the value back to the old value, there is an endless loop. I know the value has been changed WHEN ValueChanged event is triggered. How can we cancel the value change?
Thanks for help.
Hello,
Actually you cannot cancel the ValueChanged event. What you can do is to use the event arguments. There are two properties there:
e.OldValue and e.NewValue.
You can set the xamDateTimeEditor.Value to the e.OldValue, in order to revert back to the editor's previous value.
Hope this helps you.
Regards,
Anastas
Thank you for your reply. This is exactly what I've done. However, if set xamDateTimeEditor.Value = e.OldValue. Valuechanged event will be triggered again.