Current Time Marker Override

3 posts, 0 answers
  1. Matthew
    Matthew avatar
    17 posts
    Member since:
    Jun 2011

    Posted 04 Jan 2018 Link to this post


    We have a need to test our application for different days of the year, we are doing this by setting a 'fake' system DateTime.  I'd like to display this on the gantt via the currentTimeMarker.  Is there anyway to override the datetime that this line uses either in JS or c#?

    Thanks, Matt

  2. Tyler
    Tyler avatar
    68 posts
    Member since:
    Feb 2017

    Posted 04 Jan 2018 in reply to Matthew Link to this post

    This dojo example is a modified version of this stackoverflow answer that allows you to add custom time markers. It involves a little bit of calculations to get the right position. 

    This has one draw back, which is it does not have the built in functionality of moving down the scheduler as the time changes.

    As far as I know, there is nothing that gives you control over their current time marker, and so I believe custom time markers will be necessary, if you need functionality of it moving down the scheduler, that will have to be a custom solution you implement.


    (You could just have a timing function that goes off after so many seconds/minutes that just runs the function to calculate and place the marker to update it. Hmm, seems potentially easier than I thought originally).

  3. Joana
    Joana avatar
    210 posts

    Posted 08 Jan 2018 Link to this post

    Hi all,

    Thank you, Tyler, for sharing your sample.

    I have prepared a dojo sample which contains another approach for creating custom time markers: Indeed, if you need to update the time marker position in a certain interval, you will need a timing function to change its position.

    Let me know if you have further questions.

    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top