Hi All !Szenario:I' have created a simple application where a user can select a start and stop date/time by two UltraDateTimeEditors. The selectetd start/stop date/time is valid if start (date/time) <= stop (date/time). Otherwise a prompt will be displayed by a MessageBox.Problem:When selecting a year at the start (date/time) UltraDateTimeEditor via forward button, the UltraDateTimeEditor's ValueChanged EventHandler goes into an infinity loop.You can reproduce this behaviour by four steps:1) Create application with a Form and two UltraDateTimeEditors2) Create two UltraDateTimeEditors, one for the start time (startDateTimeEditor) and one for the stop time (stopDateTimeEditor)3) Register on each UltraDateTimeEditors the ValueChanged event and place the source code like this: private void startDateTimeEditor_ValueChanged(object sender, EventArgs e) { if (sender is UltraDateTimeEditor) { int r = this.startDateTimeEditor.DateTime.CompareTo(this.stopDateTimeEditor.DateTime); // r = 0 begin == end ok // r = -1 begin < end nok // r = 1 begin > end ok if (r == 1) MessageBox.Show("Start time > stop time ", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); //Console.Out.WriteLine("Start time > stop time ); } } private void stopDateTimeEditor_ValueChanged(object sender, EventArgs e) { if (sender is UltraDateTimeEditor) { int r = this.stopDateTimeEditor.DateTime.CompareTo(this.startDateTimeEditor.DateTime); // r = 0 begin == end ok // r = -1 begin < end nok // r = 1 begin > end ok if (r == -1) MessageBox.Show("stop time < start time", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1); // Console.Out.WriteLine("stop time < start time "); } } 4) Start the application and select on the start date/time (UltraDateTimeEditor) the year via forward button.Remark:When you replace the MessageBox Dialog by a console output, the UltraDateTimeEditor works correct.Any hint or idea is welcome.Thanks in advace.Kind regrads,Claus
Hi Klaus,
I tested this out and it worked fine for me using the latest hot fix of v8.1 of the controls. What version are you using?