I have an UltraCalendarCombo where I have set the format to: MM/dd/yy HH:mm
when a user highlights the time portion and types a new 4 digit time, the new value is not retained when the user tabs away from the control.
if the user types in the colon in between the 4 digits, then the value IS retained. Is there a way to retain the value when the colon is not typed?
Hi Jesus,
There are a few ways to handle this, one would be to use an UltraMaskedEditor. But try this, handle the ValidationError event and do an additional parse attempt on the date with something like:private void CalCombo_ValidationError(object sender, DateValidationErrorEventArgs e){ if (e.ErrorCode == DateValidationError.UnableToParseValue) { DateTime dtNew = DateTime.MinValue; if (DateTime.TryParseExact(e.ErrorValue as string, "MM/dd/yy HHmm", System.Globalization.CultureInfo.CurrentCulture, System.Globalization.DateTimeStyles.None, out dtNew)) { e.NewValue = dtNew; } }}
Let me know how this works for you,
this works. Thank you!