How to Access the Scheduler navigation datepicker

2 posts, 1 answers
  1. Grant
    Grant avatar
    41 posts
    Member since:
    Jul 2016

    Posted 23 Sep Link to this post

    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

  2. Answer
    Veselin Tsvetanov
    Admin
    Veselin Tsvetanov avatar
    278 posts

    Posted 27 Sep Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
Back to Top