Defaulting Start Date on TimelineView

3 posts, 1 answers
  1. Lester
    Lester avatar
    8 posts
    Member since:
    Mar 2011

    Posted 16 Mar 2011 Link to this post

    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. Lester
    Lester avatar
    8 posts
    Member since:
    Mar 2011

    Posted 16 Mar 2011 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Answer
    Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 21 Mar 2011 Link to this post

    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!
Back to Top