Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Unhandled exception - Min Date (Read 5639 times)
davidv
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: May 26th, 2007
Unhandled exception - Min Date
May 26th, 2007 at 2:52am
Print Post  
Not sure if this is a bug or I am doing something wrong, however I get an unhandled exception when I go to the month view and select the back button (to go to the previous month). The error message is:

"Ticks must be between DateTime.MinValue.Ticks and DateTim.MaxValue.Ticks"

I am using .NET Planner version 4.2.1. Any ideas what the problem might be?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Unhandled exception - Min Date
Reply #1 - May 28th, 2007 at 5:50am
Print Post  
Are you by any chance trying to scroll before Jan 1st, 0001? If not, can you give me some more information about the settings in your calendar and if possible the stack trace of this exception? Also, do you have any events (appointments) in the schedule?

Thank you,
Meppy
  
Back to top
 
IP Logged
 
davidv
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: May 26th, 2007
Re: Unhandled exception - Min Date
Reply #2 - May 28th, 2007 at 9:09am
Print Post  
Hi,

No the date is not Jan 1st 0001. Yes there are appointments in the schedule. Here is when it occurs:

•The date of the planner is set to the current date on form load,
•Initially displays in week mode,
•I click on the month to go to month mode,
•Click on the back button (go to previous month)
•Unhandled error is thrown:
System.ArgumentOutOfRangeException: Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.
Parameter name: ticks
   at System.DateTime..ctor(Int64 ticks)
   at System.DateTime.op_Addition(DateTime d, TimeSpan t)
   at MindFusion.Scheduling.WinForms.Calendar.xba35abfe624cc5dc()
   at MindFusion.Scheduling.WinForms.Calendar.x1c9e0eff9208c357(Object xe0292b9ed559da7d, EventArgs xfbf34718e704c6bc)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Unhandled exception - Min Date
Reply #3 - May 28th, 2007 at 9:59am
Print Post  
Can you also check the value of Calendar.EndDate property when you press the back button? If this doesn't help, is there a chance you can send me your application or a new application reproducing this bug? It will be greatly appreciated.

Thank you,
Meppy
  
Back to top
 
IP Logged
 
davidv
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: May 26th, 2007
Re: Unhandled exception - Min Date
Reply #4 - May 28th, 2007 at 10:45am
Print Post  
Hi,

Ok I've got it working. The problem seems to be that EndDate was been set to 1/1/01. When I set it to something else in the form load the error doesn't occur any more.

Thanks for your help.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint