Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
95
Month, Calendar, and Week views are not showing all days of an activity.
posted

Hi,

I am using these controls just for display purposes and to allow the user to click on an activity which will direct them to another page.  That process works perfectly, but the problem lies in the activity start and end days.  For example, if I set the StartDateTime of the activity to Nov. 20, 2008 and the EndDateTime of the activity to Nov. 25, 2008, the activity displays on the 20th, 21, 22, 23, and 24th, but not on the 25th.  Here is a code snippet of what I am doing:

Appointment appt = new Appointment(WebScheduleInfo1);

//Set Pertinent properties on the Acitivity

appt.Subject = drEvent["EventName"].ToString();

appt.StartDateTime = SmartDate.Parse(drEvent["StartDate"].ToString());

appt.EndDateTime= SmartDate.Parse(drEvent["EndDate"].ToString());

appt.Key = drEvent["EventID"].ToString();

appt.AllDayEvent = true; // NOTE:  I have also NOT set this - Just thought I would try with and without

appt.ResourceKey = this.WebScheduleInfo1.VisibleResources.UnassignedResource.Key;

appt.Location = drEvent["Location"].ToString();

// Add the new event to the activities collection

this.WebScheduleInfo1.Activities.Add(appt);

 The dates are in short format with no times.  I have tried it with times and without times.  The result is the same.  I know you can set the duration of the activity, but I would think there would be a way to do this without having to do this, but perhaps not.

Any help woudl be grateful. 

Just another note:  The data i am using is from a datatable i have populated from a LINQ statement.  In this instance I have converted the datetime to short (no times, just date). 

 cheers,

 

vic