The k-nav-day directive is not working in "timelineMonth" view.
Dojo : http://dojo.telerik.com/IyEmA
Expected : A click on a date in the "timelinemonth" view should change the view to "dayview."
Actual : A click on a date in the "timelinemonth" do nothing.
Thank you,
SLM
3 Answers, 1 is accepted
0
Veselin Tsvetanov
Telerik team
answered on 25 Apr 2017, 11:44 AM
Hi,
The click on the .k-nav-day link in the day header of the TimelineMonth view is designed to navigate to the Timeline view for the respective day. You could observe that default behaviour of the widget on the Scheduler Timeline demo.
When there is no Timeline view configured (as on the Dojo sent), no navigation is expected to occur.
Yes, the required could be achieved by applying some custom logic to the click event handler on the k-nav-day link and to the navigate event handler of the Scheduler:
var selectedDate;
var shouldPreventNavigation;
$("#scheduler").kendoScheduler({
navigate: function(e) {
console.log('nav');
var view = e.view;
selectedDate = e.date;
if (shouldPreventNavigation) {
shouldPreventNavigation = false;
e.preventDefault();
}
},
...........
$('.k-nav-day').on('click', function(){
console.log('click');
shouldPreventNavigation = true;
var scheduler = $("#scheduler").data('kendoScheduler');