In short, the timeline does not offer anything out of the box to help you in this respect. You can, however, use the following logic to calculate the time, corresponding to the mouse click:
- Calculate the current visible period, that is timeline.VisiblePeriodEnd - timeline.VisiblePeriodStart.
- Get the width of the timeline control.
- Calculate the ticks-per-pixel value - just divide the visible period in ticks by the width of the control.
- Check the X of the point, where the use clicked and multiply it by the ticks-per-pixel value - this should be the time value that you need.
Please note, that this method is not very accurate and in case you are visualizing a period of over a year, the day, minute, etc. might not be precise.
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>