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

Timeline date k-nav-day not working

3 Answers 87 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
SLM
Top achievements
Rank 1
SLM asked on 24 Apr 2017, 12:58 PM

Hello,

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

Sort by
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.


Regards,
Veselin Tsvetanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
SLM
Top achievements
Rank 1
answered on 26 Apr 2017, 01:28 PM

Hello,

I understand that it's not a bug,

But, is it possible to do it anyway ?

Thank you,

SLM

0
Veselin Tsvetanov
Telerik team
answered on 28 Apr 2017, 11:07 AM
Hi,

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');
   
  setTimeout(function(){
     console.log('change');
     scheduler.view('day');
     scheduler.date(selectedDate);
  }, 0);
});

Here you will find a small Dojo sample, implementing the above.

Regards,
Veselin Tsvetanov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
SLM
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
SLM
Top achievements
Rank 1
Share this question
or