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#?
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.