DateTimeEditBox popup (MonthCalendar) crashes when Maximum is set to DateTime.MaxValue

Editors for WPF Forum

Posted 11 years ago by Ilian Pinzon
Version: 13.1.0582
Platform: .NET 4.0
Environment: Windows 7 (64-bit)
Avatar

Hi Guys,

As the title says, the DateTimeEditBox popup (i.e. MonthCalendar) crashes when Maximum is set to DateTime.MaxValue. This can be reproduced with:

<Page
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:sys="clr-namespace:System;assembly=mscorlib"
  xmlns:ae="clr-namespace:ActiproSoftware.Windows.Controls.Editors;assembly=ActiproSoftware.Editors.Wpf">
  <StackPanel>  
    <ae:DateTimeEditBox Maximum="{x:Static sys:DateTime.MaxValue}" Value="9999-10-31" />
  </StackPanel>
</Page>

 

Steps to reproduce:

  1. Open the edit box's drop down. Still OK here.
  2. Press the right arrow to move the month to November 9999. Still OK here.
  3. Press the right arrow again to move the month to December 9999. Crashes here.

I suspect the crash occurs because MonthCalendar will try to generate the items for the next month (which is beyond DateTime's range).

Comments (1)

Answer - Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Ilian,

Thanks for reporting this.  We'll fix it for the next maintenance release.


Actipro Software Support

The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.