I have a basic XamDateTimeEditor defined in xaml bound to a property on the DataContext.
<igEditors:XamDateTimeEditor MinWidth="125" Margin="5,5,5,5" x:Name="StartDateTimeEditor" Mask="mm/dd/yyyy {time}" > <igEditors:XamDateTimeEditor.Text> <Binding Path="StartDate" > </Binding> </igEditors:XamDateTimeEditor.Text> </igEditors:XamDateTimeEditor>
For what ever reason, the TIME that is displayed is always PM when it suppose to be AM.
DateTime startDate = new DateTime(2008, 1, 1, 0, 0, 0);
Is this a know bug ? Or am I doing something wrong ?
Thanks
Allen
Hi Allen,
Try binding to the Value property of the editor and let me know if that works.
As far as why Value would work correctly and Text would not, I believe, has to do with conversion. Binding does not support automatic ValueConversion and Text is a string while StartDate is a DateTime object. Value takes an object, so it will take a DateTime object. I'm surprised binding the Text property to the DateTime object partially works.