I posted the question How to use Keywords and Custom Entry in XamDateTimeEditor a while ago. I did implement a converter that can interpret my commands and make valid dates out of them. But as soon as I pick a date from the DatePicker xamDateTimeEditor considers it an invalid date.
In the example solution I did not add the ValueConverter. Therefore the date is always invalid, whether entered manually or selected with the Picker.
Why is that and how can I fix it while maintaining my ability to interpret commands? According to an answer by Alex Finadov to my original question that should be possible by now.
Sorry, I overlooked the use of ValueToTextConverter property. The command works with that. But picking a date from the drop down will still mark the date as invalid (with a red border).
Don't you get a red border around the date field when you pick a date from the drop down?
Hi Petar
I copied your suggested solution-Converter to my sample application. Unfortunately the Command is considered invalid just as a date selected from the drop down.
Could you attach your working sample solution as a reference?
Thank you
Torsten
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
If the above suggestion helped you solve your issue please verify the thread as answered so other users may take better advantage of it.
Sincerely,Petar MonovDeveloper Support EngineerInfragistics Bulgariawww.infragistics.com/support
Hello Torsten,
I have been looking into this for you and have followed through Alex’ description. The issue is now fixed and I have even tested it to find it working as you need it to. I did the tests with version 10.2’s latest Service Release (10.2.20102.2174) and with 10.3. Here is the converter I used for testing:
class CCCConverter : IValueConverter
{
#region IValueConverter Members
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
return value;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
if (value != null)
if (value.ToString() == "Now" || value.ToString() == "now")
return DateTime.Now;
#endregion
And I set this to the XamDateTimeEditor’s ValueToTextConverter property.
Hope this helps. Please let me know if can assist you any further on the matter.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support