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:
//Set Pertinent properties on the Acitivity
appt.StartDateTime = SmartDate.Parse(drEvent["StartDate"].ToString());
appt.EndDateTime= SmartDate.Parse(drEvent["EndDate"].ToString());
appt.AllDayEvent = true; // NOTE: I have also NOT set this - Just thought I would try with and without
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
Hi Vic,
That is possible UTC problem. Try to use Start/EndDateTimeUtc instead of Start/EndDateTime. Also you may try to use Duration instead of EndDateTime.
If that will not work and you use display only, then you may add few hours to the EndDateTime of appointments.
Thanks Viktor,
I have used the duration property and it does work, but it doesn't seem logical to have to set that. I would think that the control classes should pick that up (startdatetime and enddatetime) and do it without having to set duration or using utc. I am not using times, just dates.
I guess for now I will have to set the duration.