This is a migrated thread and some comments may be shown as answers.
Current Time Marker Override
2 Answers 32 Views
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 04 Jan 2018, 12:29 PM

Hi,

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 Answers, 1 is accepted

Sort by
0
Tyler
Top achievements
Rank 1
answered on 04 Jan 2018, 10:10 PM

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).

0
Joana
Telerik team
answered on 08 Jan 2018, 11:12 AM
Hi all,

Thank you, Tyler, for sharing your sample.

I have prepared a dojo sample which contains another approach for creating custom time markers: http://dojo.telerik.com/@jivanova/ugenod. 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.

Regards,
Joana
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.
Asked by
Matthew
Top achievements
Rank 1
Answers by
Tyler
Top achievements
Rank 1
Joana
Telerik team
Share this question
or