This is a migrated thread and some comments may be shown as answers.

Defaulting Start Date on TimelineView

2 Answers 89 Views
Scheduler and Reminder
This is a migrated thread and some comments may be shown as answers.
Lester
Top achievements
Rank 1
Lester asked on 16 Mar 2011, 12:17 PM
Hi,

I am not able to set the start date of the Timeline View to the Current Date. It always defaults to 31 Dec 2010.
The Range is applied correctly. i.e. 1 Year on either side of today.

I did refer to the documentation at - http://www.telerik.com/help/winforms/scheduler-views-timeline-view.html

and have the following in my code:

this.rScheduler.GetTimelineView().StartDate = DateTime.Today;
this.rScheduler.GetTimelineView().RangeStartDate = DateTime.Today.AddYears(-1);
this.rScheduler.GetTimelineView().RangeEndDate = DateTime.Today.AddYears(1);

If I change the first statement to: this.rScheduler.GetTimelineView().StartDate = new DateTime(2010, 11, 20);
this sets the default date on the Timeline View to this date correctly when the TimelineView is shown.
Any date after 31st Dec 2010 sets the Time Line View Start date to 31st Dec 2010.

Thanks,
Lester

 

2 Answers, 1 is accepted

Sort by
0
Lester
Top achievements
Rank 1
answered on 16 Mar 2011, 04:58 PM
This problem is now resolved. ... :):)

As the Range end date defaults to 31 Dec 2010 and setting the Start Date to DateTime.Today did no effect.
When I changed the order of assignment it worked.


this.rScheduler.GetTimelineView().RangeStartDate = DateTime.Today.AddYears(-1);
this.rScheduler.GetTimelineView().RangeEndDate = DateTime.Today.AddYears(1);
this.rScheduler.GetTimelineView().StartDate = DateTime.Today;

Cheers,
Lester
0
Accepted
Dobry Zranchev
Telerik team
answered on 21 Mar 2011, 01:28 PM
Hi Lester,

Thank you for writing.

I am glad that you managed to find a workaround. This is the workaround that I was going to provide as well. I just want to add that this is a known issue and it is addressed in the latest major release Q1 2011 (v2010.1.11.315). Feel free to download it from your account.

Kind regards,
Dobry Zranchev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Scheduler and Reminder
Asked by
Lester
Top achievements
Rank 1
Answers by
Lester
Top achievements
Rank 1
Dobry Zranchev
Telerik team
Share this question
or