private Model.Schedule schedule = BusinessCalls.ScheduleBusinessCalls.GetSchedule();
TimeSpan startTime = new TimeSpan(schedule.ScheduleStartDate.Hour, schedule.ScheduleStartDate.Minute, schedule.ScheduleStartDate.Second);
TimeSpan endTime = new TimeSpan(schedule.ScheduleEndDate.Hour, schedule.ScheduleEndDate.Minute, schedule.ScheduleEndDate.Second);
RadScheduler1.DayStartTime=startTime;
RadScheduler1.DayEndTime=endTime;
RadScheduler1.MinutesPerRow=schedule.ScheduleTimeSlotIncrements;
RadScheduler1.DataStartField="appointmentStarting";
RadScheduler1.DataSubjectField="appointmentSubject";
RadScheduler1.DataEndField="appointmentEnding";
RadScheduler1.DataKeyField="appointmentID";
RadScheduler1.DataSource=appointments;
RadScheduler1.DataBind();
My schedule object has a schedule.StartDate of 10/10/2007 09:00AM
My schedule object has a schedule.EndDate of 17/10/2007 05:00PM
I make 2 timespan objects with these 2 times above and that will be my start and end times per day until schedule expires.
If I run as this, it runs correctly and the start/end times are correct however the dayHeader date is datetime.now (whatever my local time is)
So if I change the dayheader.selectedDate to schedule.ScheduleStartDate (by default the dayHeaderFormat is "D") or DateToLongString() my date displays how i want it to however, now my start and end times change to 6pm - 2am.
I'm really not sure what is going on? I tried to timezoneoffset and the times did not change.
Thanks in advance,
Jeremy