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

How to Access the Scheduler navigation datepicker

1 Answer 327 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Grant asked on 23 Sep 2016, 01:07 PM

Hi, 

Is there a way to access the DatePicker widget (and description text) that is used for navigation in the kendoScheduler? I'd like to change a few of its options.

Thanks,
Grant

1 Answer, 1 is accepted

Sort by
0
Accepted
Veselin Tsvetanov
Telerik team
answered on 27 Sep 2016, 10:43 AM
Hello Grant,

You could get the Scheduler calendar text elements (there are two of them, one for narrow screens and one for wide) in the following way:
var descriptionTexts = $('.k-i-calendar').siblings();

While you could access the Scheduler embedded Calendar:
var calendar = scheduler.calendar;

Note that in order to obtain a reference to that Calendar, it needs to be initialized. This happens, when its pop-up is opened for the first time. Therefore, if you want to initially get reference to this widget, you will have to manually open and close the pop-up:
$( document ).ready(function() {
    var scheduler = $("#scheduler").data("kendoScheduler");
    scheduler._showCalendar();
  $('.k-animation-container').css('display', 'none');
    scheduler.popup.close();
    var calendar = scheduler.calendar;
  // Customize calendar here
});

You could find a simple implementation in the following Dojo example.

Regards,
Veselin Tsvetanov
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Scheduler
Asked by
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or