<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Moving the calendar back and forward through dates</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Calendar : Moving the calendar back and forward through dates]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 10:01:30 +0000</pubDate>
  <lastBuildDate>Fri, 03 Nov 2006 11:51:58 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=5398</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Moving the calendar back and forward through dates : Another possible easy solution...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5398&amp;PID=16997&amp;title=moving-the-calendar-back-and-forward-through-dates#16997</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 5398<br /><strong>Posted:</strong> 03 November 2006 at 11:51am<br /><br />Another possible easy solution would be to add some amount of time to rangeEnd (1 minute for example). In this case Doubles should be compared fine...<br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Fri, 03 Nov 2006 11:51:58 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5398&amp;PID=16997&amp;title=moving-the-calendar-back-and-forward-through-dates#16997</guid>
  </item> 
  <item>
   <title><![CDATA[Moving the calendar back and forward through dates : Hi,I think I see the problem....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5398&amp;PID=16996&amp;title=moving-the-calendar-back-and-forward-through-dates#16996</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=862">sserge</a><br /><strong>Subject:</strong> 5398<br /><strong>Posted:</strong> 03 November 2006 at 11:50am<br /><br />Hi,<br><br>I think I see the problem. It might happen because Dates are represented in OLE by Double values. And 2 equal Dates could be represented by not exactly same Doubles. The defference is small, but we have to keep in mind this when compare Dates. This is not implemented in ShowDays and as a result sometimes it removes all days and do not adds one.<br>&nbsp;<br>To avoid that use ShowDay method to show only one day.<br><br>--<br>WBR,<br>Serge<br>]]>
   </description>
   <pubDate>Fri, 03 Nov 2006 11:50:06 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5398&amp;PID=16996&amp;title=moving-the-calendar-back-and-forward-through-dates#16996</guid>
  </item> 
  <item>
   <title><![CDATA[Moving the calendar back and forward through dates : CodeJock people, I have a new...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5398&amp;PID=16984&amp;title=moving-the-calendar-back-and-forward-through-dates#16984</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1751">WaaZ</a><br /><strong>Subject:</strong> 5398<br /><strong>Posted:</strong> 03 November 2006 at 5:22am<br /><br /><FONT color=#990000 size=4>CodeJock people</FONT>, I have a new patch comming out this weekend and I would really appreciate a reply.<DIV>&nbsp;</DIV><DIV>Thanks</DIV>]]>
   </description>
   <pubDate>Fri, 03 Nov 2006 05:22:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5398&amp;PID=16984&amp;title=moving-the-calendar-back-and-forward-through-dates#16984</guid>
  </item> 
  <item>
   <title><![CDATA[Moving the calendar back and forward through dates : Using 9.81 ActiveX I keep getting...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=5398&amp;PID=16925&amp;title=moving-the-calendar-back-and-forward-through-dates#16925</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1751">WaaZ</a><br /><strong>Subject:</strong> 5398<br /><strong>Posted:</strong> 01 November 2006 at 7:16am<br /><br /><P align=left><strong>Using 9.81 ActiveX</strong></P><P align=left><strong>I keep getting the following error when the user press the forward or back button below is the error and below that is the code which produces the error. <FONT color=#9900ff>This problem does not show on my computer but only on some computers.</P><DIV></FONT></strong><FONT color=#990000><strong>Exception:</strong> </FONT></DIV><DIV align=left><FONT color=#990000></FONT>&nbsp;</DIV><DIV align=left><FONT color=#990000>System.Exception: TargetInvocationException in Navigate_Cal_Back_And_Forward()., CalendarControl.ViewType = xtpCalendarDayView, CalendarControl.ActiveView.DaysCount = 1, date range = 2006-11-02 00:00:00.000 to 2006-11-02 00:00:00.000</FONT></DIV><DIV align=left><FONT color=#990000></FONT>&nbsp;</DIV><DIV align=left><FONT color=#990000><strong>Stack Trace:</strong><BR>&nbsp;<BR>JotmeApp.Calendar.CalendarBoardControl.Navigate_Cal_Back_And_Forward<BR>&nbsp;&nbsp; at JotmeApp.Calendar.CalendarBoardControl.Navigate_Cal_Back_And_Forward(Boolean forward)<BR>&nbsp;&nbsp; at JotmeApp.Calendar.CalendarBoardControl.Cal_Move_Forward_Click(Object sender, EventArgs e)<BR>&nbsp;&nbsp; at System.Windows.Forms.Control.OnClick(EventArgs e)<BR>&nbsp;&nbsp; at System.Windows.Forms.Control.WmMouseUp(Message&amp; m, MouseButtons button, Int32 clicks)<BR>&nbsp;&nbsp; at System.Windows.Forms.Control.WndProc(Message&amp; m)<BR>&nbsp;&nbsp; at System.Windows.Forms.Label.WndProc(Message&amp; m)<BR>&nbsp;&nbsp; at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&amp; m)<BR>&nbsp;&nbsp; at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&amp; m)<BR>&nbsp;&nbsp; at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)</FONT></DIV><DIV align=left>&nbsp;</DIV><DIV align=left><strong><FONT size=3><U>Now the code which produces the error:</U></FONT></strong></DIV><DIV align=left ="summary">&nbsp;</DIV><FONT size=2><P align=left ="summary"></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> Navigate_Cal_Back_And_Forward(</FONT><FONT color=#0000ff size=2>bool</FONT><FONT size=2> forward)</P><P align=left ="summary">{</P><P align=left ="summary"></FONT><FONT color=#008080 size=2>DateTime</FONT><FONT size=2> DateBegin = </FONT><FONT color=#008080 size=2>DateTime</FONT><FONT size=2>.Today;</P><P align=left ="summary"></FONT><FONT color=#008080 size=2>DateTime</FONT><FONT size=2> DateEnd = </FONT><FONT color=#008080 size=2>DateTime</FONT><FONT size=2>.Today;</P><P align=left ="summary">AxXtremeCalendarControl.</FONT><FONT color=#008080 size=2>AxDatePicker</FONT><FONT size=2> datePicker = </FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.mainFromRef.DatePicker;</P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (datePicker.Selection.BlocksCount &gt; 0)</P><P align=left ="summary">{</P><P align=left ="summary"></FONT><P align=left ="summary"><FONT color=#008000 size=2></P></FONT><FONT size=2></FONT><P align=left ="summary"><FONT color=#008000 size=2></P><DIV align=left ="summary"></FONT><FONT size=2>DateBegin = datePicker.Selection&#091;0&#093;.DateBegin; </DIV><P align=left ="summary"></P><P align=left ="summary">DateEnd = datePicker.Selection&#091;0&#093;.DateEnd;</P><P align=left ="summary"></FONT><FONT size=2>}</P><P align=left ="summary"></FONT><P align=left ="summary"><FONT color=#008000 size=2></P><DIV align=left ="summary"></FONT><FONT size=2></FONT><FONT color=#0000ff size=2>switch</FONT><FONT size=2> (CalendarControl.ViewType) </DIV><P align=left ="summary"></P><P align=left ="summary">{</P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>case</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>CalendarViewType</FONT><FONT size=2>.xtpCalendarDayView:</P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>case</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>CalendarViewType</FONT><FONT size=2>.xtpCalendarWorkWeekView:</P><P align=left ="summary"></FONT><FONT color=#008000 size=2>//************ DEBUG VERSION ******************************************</P></FONT><FONT size=2><P align=left ="summary"></FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> daysCount = CalendarControl.ActiveView.DaysCount;</P><P align=left ="summary"></FONT><FONT color=#008080 size=2>DateTime</FONT><FONT size=2> rangeStart = DateBegin.AddDays(forward</P><P align=left ="summary">? daysCount</P><P align=left ="summary">: -daysCount</P><P align=left ="summary">);</P><P align=left ="summary"></FONT><FONT color=#008080 size=2>DateTime</FONT><FONT size=2> rangeEnd = DateEnd.AddDays(forward</P><P align=left ="summary">? daysCount</P><P align=left ="summary">: -daysCount</P><P align=left ="summary">);</P><P align=left ="summary"></FONT><FONT color=#008080 size=2>Application</FONT><FONT size=2>.DoEvents();</P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>try</P></FONT><FONT size=2><P align=left ="summary">{</P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (!CalendarControl.IsDisposed)</P><P align=left ="summary">{</P><P align=left ="summary">CalendarControl.DayView.ShowDays(rangeStart, rangeEnd);</P><P align=left ="summary">}</P><P align=left ="summary">}</P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>catch</FONT><FONT size=2> (</FONT><FONT color=#008080 size=2>Exception</FONT><FONT size=2> ex)</P><P align=left ="summary">{</P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>throw</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>Exception</FONT><FONT size=2>(ex.GetType().Name + </FONT><FONT color=#800000 size=2>" in Navigate_Cal_Back_And_Forward()."</P></FONT><FONT size=2><P align=left ="summary">+ </FONT><FONT color=#800000 size=2>", CalendarControl.ViewType = "</FONT><FONT size=2> + CalendarControl.ViewType.ToString()</P><P align=left ="summary">+ </FONT><FONT color=#800000 size=2>", CalendarControl.ActiveView.DaysCount = "</FONT><FONT size=2> + daysCount</P><P align=left ="summary">+ </FONT><FONT color=#800000 size=2>", date range = "</FONT><FONT size=2> + rangeStart.ToString(</FONT><FONT color=#800000 size=2>"yyyy-MM-dd HH:mm:ss.fff"</FONT><FONT size=2>)</P><P align=left ="summary">+ </FONT><FONT color=#800000 size=2>" to "</FONT><FONT size=2> + rangeEnd.ToString(</FONT><FONT color=#800000 size=2>"yyyy-MM-dd HH:mm:ss.fff"</FONT><FONT size=2>)</P><P align=left ="summary">);</P><P align=left ="summary">}</P><P align=left ="summary"></FONT><FONT color=#008000 size=2>//************ DEBUG VERSION ******************************************</P></FONT><FONT size=2><P align=left ="summary"></FONT><FONT color=#0000ff size=2>break</FONT><FONT size=2>;</P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>case</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>CalendarViewType</FONT><FONT size=2>.xtpCalendarMonthView:</P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (forward)</P><P align=left ="summary">{</P><P align=left ="summary">CalendarControl.ViewChanged -= </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> System.</FONT><FONT color=#008080 size=2>EventHandler</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.CalendarControl_ViewChanged);</P><P align=left ="summary">CalendarControl.ActiveView.ShowDay(DateEnd.AddDays(5), </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>);</P><P align=left ="summary">CalendarControl.ViewChanged += </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> System.</FONT><FONT color=#008080 size=2>EventHandler</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.CalendarControl_ViewChanged);</P><P align=left ="summary">CalendarControl.ViewType = XtremeCalendarControl.</FONT><FONT color=#008080 size=2>CalendarViewType</FONT><FONT size=2>.xtpCalendarMonthView;</P><P align=left ="summary">}</P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>else</P></FONT><FONT size=2><P align=left ="summary">{</P><P align=left ="summary">CalendarControl.ViewChanged -= </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> System.</FONT><FONT color=#008080 size=2>EventHandler</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.CalendarControl_ViewChanged);</P><P align=left ="summary">CalendarControl.ActiveView.ShowDay(DateBegin.AddDays(-5), </FONT><FONT color=#0000ff size=2>true</FONT><FONT size=2>);</P><P align=left ="summary">CalendarControl.ViewChanged += </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> System.</FONT><FONT color=#008080 size=2>EventHandler</FONT><FONT size=2>(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.CalendarControl_ViewChanged);</P><P align=left ="summary">CalendarControl.ViewType = XtremeCalendarControl.</FONT><FONT color=#008080 size=2>CalendarViewType</FONT><FONT size=2>.xtpCalendarMonthView;</P><P align=left ="summary">}</P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>break</FONT><FONT size=2>;</P><P align=left ="summary"></P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>case</FONT><FONT size=2> </FONT><FONT color=#008080 size=2>CalendarViewType</FONT><FONT size=2>.xtpCalendarWeekView:</P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (forward)</P><P align=left ="summary">{</P><P align=left ="summary">CalendarControl.ActiveView.ShowDay(DateEnd.AddDays(1), </FONT><FONT color=#0000ff size=2>false</FONT><FONT size=2>);</P><P align=left ="summary">}</P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>else</P></FONT><FONT size=2><P align=left ="summary">{</P><P align=left ="summary">CalendarControl.ActiveView.ShowDay(DateBegin.AddDays(-1), </FONT><FONT color=#0000ff size=2>false</FONT><FONT size=2>);</P><P align=left ="summary">}</P><P align=left ="summary"></FONT><FONT color=#0000ff size=2>break</FONT><FONT size=2>;</P><P align=left ="summary">}</P><P align=left ="summary">}</P></FONT></TD></TR>]]>
   </description>
   <pubDate>Wed, 01 Nov 2006 07:16:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=5398&amp;PID=16925&amp;title=moving-the-calendar-back-and-forward-through-dates#16925</guid>
  </item> 
 </channel>
</rss>