Some way to change the calendar template of scheduler

2 posts, 0 answers
  1. Ricardo
    Ricardo avatar
    1 posts
    Member since:
    Aug 2016

    Posted 28 Oct Link to this post

    Regards,

    I want show in the scheduler some days colored and some days with normal colors. I try this without results: 

     

    var scheduler = $("#scheduler").data("kendoScheduler");
    scheduler._showCalendar();
    $('.k-animation-container').css('display', 'none');
    scheduler.popup.close();
    var calendar = scheduler.calendar;
    calendar.month = {
      content: $('<script id="cell-template" type="text/x-kendo-template"><div class="#= data.value < 10 ? "exhibition" : "party" #"> #= data.value #  </div> </script>').html() };

     

    And

     

    calendar.month = { content: '# if ($.inArray(+data.date, data.dates) != -1) { #' +
                  '<div class="' +
                  '# if (days.indexOf(data.value) > -1) { #' +
                    'calendar bold-day" # } #' +
                  '"> #= data.value #</div>'+
                '# } else { #' +
                '#= data.value #' +
                '# } #' };

     

    Thanks for the help.

  2. Peter Milchev
    Admin
    Peter Milchev avatar
    139 posts

    Posted 01 Nov Link to this post

    Hello Ricardo,

    You could use the views.eventTemplate configuration to set a template for every view or scheduler.eventTemplate configuration to set a template for all views. Here is a simple Dojo example representing your case.

    I would also recommend reviewing the following resources: 
    Regards,
    Peter Milchev
    Telerik by Progress
     
    Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
     
  3. Kendo UI is VS 2017 Ready
Back to Top