How to load Scheduler 'values' in kendo jQuery

2 posts, 0 answers
  1. Kasper
    Kasper avatar
    1 posts
    Member since:
    Nov 2013

    Posted 18 Dec 2013 Link to this post

    Hey Sup

    Iam playing around with the scheduler from Kendo UI - and the scheduler is working fine atm. 
    but but.. Iam trying to use some from the API demo at. 
    API Demo

    I have a html 'tool bar' as 
    <div class="schedulerHeader">
            <label>Current Date:</label><input id="currentDate" />
            <label>Current View:</label>
            <select id="views">
                <option value="agenda">Agenda</option>
                <option value="day">Day</option>
                <option value="month">Month</option>
                <option value="week">Week</option>
                <option value="workWeek">Work Week</option>

    and javascript:
    <script type="text/javascript">
        $(function () {
            var scheduler = $("#myScheduler").data("kendoScheduler");

                value: new Date("2013/12/24"),
                change: function () {

                value: scheduler.view(),
                change: function () {

    all on in the same view as my scheduler, where I can change the view and date from the 'toolbar' hurra. 
    but on site load the $("x").kendoDropDownList({ value: scheduler.view()...  is not set. I think it because that the scheduler wrapper isnt done loading. so the schedulder object in my js is 'null' when it load.
    How should I handle this ? or how are you doing it in your demo, I am looking at the example project, but cant see a clear answer.

    yeah I can use a timer... but no thanks :) 

    - Kasper 
  2. Atanas Korchev
    Atanas Korchev avatar
    8462 posts

    Posted 19 Dec 2013 Link to this post

    Hello Kasper,

    You should initialize the scheduler before the dropdownlists and then the reference will not be null. This is how we are doing it in our demo:

    $(function() {
        $("#scheduler").kendoScheduler({ /* options */ });
         var scheduler = $("#scheduler").data("kendoScheduler");
            value: new Date("2013/6/13"),
            change: function() {
            value: scheduler.view().name,
            change: function() {

    Atanas Korchev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET AJAX banner
Back to Top