Hi,
We are using XamDateTimeEditor control in our application, to which we need to get default value (12:00:00 AM) when user selects a date in datetime picker. We set the default value in lostfocus() event.
I have created a sample application to replicate the issue:
Here is the xaml code:
<StackPanel Orientation="Vertical">
<igEditors:XamDateTimeEditor Name="xamdate" Format="MM/dd/yy HH:mm:ss" Width="200" Height="30" Mask="mm/dd/yy hh:mm:ss tt" LostFocus="XamDateTimeEditor_LostFocus"/>
</StackPanel>
Code behind
private void XamDateTimeEditor_LostFocus(object sender, RoutedEventArgs e)
{
XamDateTimeEditor XamDateTimeEditor = (sender as XamDateTimeEditor);
DateTime? dt = XamDateTimeEditor.DateValue;
if (dt.HasValue)
XamDateTimeEditor.Value = dt.Value;
}
The problem is:
1. User selects a date in datetime picker and deletes meridiem value(AM). 2. For instance, user selects 6 September 2016. Then the value appear along with default time as shown below: 3. Now, user deletes meridiem value (AM )and clicks on dropdown arrow. At this point PM is appearing. But user expects AM as it was default time.
Please suggest the solution to resolve this.
Note:
1. This behavior is not seen when Time portion value is between (00:00:00 to 11:59:00) , other than this value i.e., 12:00:00 to 12:59:00 issue is observed. Is this control behavior ? Please let us know.2. Above mention Sample application is what we have in our application, but this problem is also seen if there is no event added to XamDateTimeEditor control.
Please respond as soon as possible.
Thanks,Srilaxmi
Hi Srilaxmi,
Looks like this behavior only occurs in 14.2 and 15.1. Somewhere after those versions the behavior changed to where it no longer reproduces your issue so we probably made a bug fix for this in 15.2 since I can't reproduce it in 15.2. I'm not really sure how you can work around this other than maybe explicitly changing the TimeOfDay. I recommend upgrading to at least version 15.2. 14.2 and 15.1 no longer receive bug fixes as support for those has expired.
Hi Rob,
Thanks for responding. I have attached my sample application. Please go through it and let me know if any further information is needed.
The infragistics version that we are using is 14.2 (14.2.20142.2024)
Thanks & Regards,
Srilaxmi
Hello Srilaxmi,
Do you have an actual sample you can attach to this thread from which I can look at? If not, what version of the Infragistics product are you using? 15.2? 16.1?