Bug Report B132101
Visible to All Users

Navigation Button - An exception occurs in the nearest appointment search procedure. The message is: '1/4/2009 12:00:00 AM' is not a valid value for 'End'.

created 16 years ago

Hi,
My name is Chris Craft, and we are having some issues tracking down the source of an exception we are getting.
We have several questions. We are getting a pretty generic and ambiguous exception. It might be internal. But we also don't see an "End" property, and we don't seem to be setting anything to '1/4/2009 12:00:00 AM' so I'm confused about the source of the issue.
Our code used to work fine, not to say we didn't break it, but to say we have seen it work before.
We could really use some assistance tracking the source of this issue, thanks!
Here is the code we are calling:
            Cursor.Current = Cursors.WaitCursor;
            lbxCalendars.BeginUpdate();
            schedulerControl.BeginUpdate();
            try
            {
                foreach (CheckedListBoxItem item in lbxCalendars.Items)
                    item.CheckState = CheckState.Unchecked;
                Global.SaveUserSetting("CAL_SHOW_PUBLISHED", "0");
                alwaysShowPublished = false;
                Global.SaveUserSetting("CAL_SELCAL", GetUnselectedCalendars());
                schedulerStorage.ForceRaiseInternalResourceVisibilityChanged();
            }
            finally
            {
                schedulerControl.EndUpdate();
                lbxCalendars.EndUpdate();
                Cursor.Current = Cursors.Default;
            }
In the finally statement on the line schedulerControl.EndUpdate(); we get the following exception.
System.ArgumentException "'1/4/2009 12:00:00 AM' is not a valid value for 'End'"
Here is the stack trace:
[See Actual Results]
Steps to Reproduce:
We have a control that contains a checkbox list of calendars, we all calendars are removed we get the dreaded System.ArgumentException "'1/4/2009 12:00:00 AM' is not a valid value for 'End'".
Actual Results:
System.ArgumentException "'1/4/2009 12:00:00 AM' is not a valid value for 'End'"
   at DevExpress.XtraScheduler.Native.Exceptions.ThrowArgumentException(String propName, Object val)
   at DevExpress.XtraScheduler.TimeInterval.set_End(DateTime value)
   at DevExpress.XtraScheduler.TimeInterval…ctor(DateTime start, DateTime end)
   at DevExpress.XtraScheduler.Native.PrevNextAppointmentCalculator.FindNearestAppointmentIntervalAfter(AppointmentBaseCollection appointments, AppointmentBaseCollection patterns, DateTime date)
   at DevExpress.XtraScheduler.Native.PrevNextAppointmentCalculator.CalculatePrevNextAppointments(AppointmentBaseCollection sourceAppointments, ResourceAppointmentsProcessorPair pair, TimeInterval interval)
   at DevExpress.XtraScheduler.Native.NavigationButtonCalculator.CalculatePairs(ResourceProcessorPairCollection criteria)
   at DevExpress.XtraScheduler.Native.NavigationButtonCalculator.Calculate()
   at DevExpress.XtraScheduler.Drawing.SchedulerViewInfoBase.ExecuteNavigationButtonsLayoutCalculator(GraphicsCache cache)
   at DevExpress.XtraScheduler.Drawing.SchedulerViewInfoBase.CalcFinalLayoutCore(GraphicsCache cache)
   at DevExpress.XtraScheduler.Drawing.SchedulerViewInfoBase.CalcFinalLayout()
   at DevExpress.XtraScheduler.SchedulerViewBase.RecalcFinalLayout()
   at DevExpress.XtraScheduler.SchedulerControl.RecalcFinalLayout()
   at DevExpress.XtraScheduler.SchedulerControl.DevExpress.XtraScheduler.Native.IInnerSchedulerControlOwner.RecalcFinalLayout()
   at DevExpress.XtraScheduler.Native.InnerSchedulerControl.DevExpress.XtraScheduler.Native.ISchedulerControlChangeTarget.RecalcFinalLayout()
   at DevExpress.XtraScheduler.Native.SchedulerControlChangeManager.RecalcFinalLayout()
   at DevExpress.XtraScheduler.Native.SchedulerControlChangeManager.ApplyChangesCore()
   at DevExpress.XtraScheduler.Native.SchedulerControlChangeManager.ApplyChanges(ISchedulerControlChangeTarget target)
   at DevExpress.XtraScheduler.Native.InnerSchedulerControl.ApplyChangesCore(List`1 changeTypes, ChangeActions actions)
   at DevExpress.XtraScheduler.Native.InnerSchedulerControl.DevExpress.Utils.IBatchUpdateHandler.OnLastEndUpdate()
   at DevExpress.Utils.BatchUpdateHelper.EndUpdate()
   at DevExpress.XtraScheduler.Native.InnerSchedulerControl.EndUpdate()
   at DevExpress.XtraScheduler.SchedulerControl.EndUpdate()
   at AcsTech.Client.Win.Scheduler.Views.BoundModeModule.toolStripMenuItemClearAll_Click(Object sender, EventArgs e) in C:\Projects\Solutions\Win\AcsTech.Client.Win.Scheduler\Views\Calendar.cs:line 1893
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Expected Results:
empty calendar

Comments (1)
DevExpress Support Team 16 years ago

    Hi Chris,
    Unfortunately, the code snippet provided doesn't allow us to clearly diagnose the cause of your issue.
    Most likely, you can disable the navigation buttons to fix this problem.
    Please provide us with a sample illustrating your issue.
    We will examine it and provide you with a solution.
    Thanks,
    Andrew

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.