This is a migrated thread and some comments may be shown as answers.

Get current eventDate value

1 Answer 19 Views
Timeline
This is a migrated thread and some comments may be shown as answers.
Análisis
Top achievements
Rank 1
Análisis asked on 12 Oct 2020, 07:42 PM

Hello,

I need obtain the eventDate value from the current open event.

I try this ...but doesn't work:

 

function refresh() {
 
        var timeline = $("#Timeline").data("kendoTimeline");
        var date = new Date(timeline.dataItem.EventDate);       
 
         ....
 
}

Regards,
Santi.

 

1 Answer, 1 is accepted

Sort by
0
Anton Mironov
Telerik team
answered on 15 Oct 2020, 05:42 PM

Hello Santi,

Thank you for the provided code snippet.

For this case, I would recommend using the expand event of the Kendo UI TimeLine. In the function handler, get the current node and use its date as necessary. Here is an example:

expand: function(e) {
              console.log(e.dataItem.date);
            }

The complete implementation could be found in the following dojo example:

Let me know if further assistance is needed.

 

Kind Regards,
Anton Mironov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Timeline
Asked by
Análisis
Top achievements
Rank 1
Answers by
Anton Mironov
Telerik team
Share this question
or