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

Some way to change the calendar template of scheduler

1 Answer 71 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ricardo
Top achievements
Rank 1
Ricardo asked on 28 Oct 2016, 08:55 PM

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.

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 01 Nov 2016, 12:23 PM
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.
 
Tags
Scheduler
Asked by
Ricardo
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or