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

How to create a Kendo Scheduler custom view with a majortick of a month?

4 Answers 86 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 19 Apr 2019, 09:44 AM

I would like to have a Kendo Scheduler of a complete year where a major tick is a month, and a minor tick is half of the month.
I created a custom view representing an year, that's ok but this view represent an year where each majortick is a day due to the majortick that can have only minutes values.

This is the custom view:

(function ($, undefined) {
   var kendo = window.kendo,
       ui = kendo.ui,
       SchedulerTimelineView = ui.TimelineView,
       extend = $.extend,
       NS = ".kendoTimelineYearView";
 
   var SchedulerTimelineYearView = SchedulerTimelineView.extend({
     nextDate: function() {
       var start = this.startDate();
       return new Date(start.getFullYear()+1, 0, 1);
     },
     previousDate: function() {
       var start = this.startDate();
       return new Date(start.getFullYear()-1, 0, 1);
     },
     calculateDateRange: function() {
       var selectedDate = this.options.date,
           start = new Date(selectedDate.getFullYear(), 0, 1),
           end = kendo.date.previousDay(new Date(selectedDate.getFullYear()+1, 0, 1)),
           dates = [];
 
       while (start <= end) {
         dates.push(start);
         start = kendo.date.nextDay(start);
         //start = dateAdd(start, 'month', 1);
       }
       this._render(dates);
     }
   })
 
   //extend UI
   extend(true, ui, {
     SchedulerTimelineYearView: SchedulerTimelineYearView
   });
 
 })(window.kendo.jQuery);

this are the property of the view in the init:

{
     type: "kendo.ui.SchedulerTimelineYearView",
     title: "Year",
     majorTick: 1440*30, // 30 days but i want exactly a month
     minorTickCount: 2,
     columnWidth: 50
},


How I've already said, I would like to have a scheduler with a complete year where the major tick represent a month and the minortick represent half month(not 30 days but exactly a month).
Is this possible?



4 Answers, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 23 Apr 2019, 06:07 AM
Hi David,

I am afraid that the majorTick option configuring the view in the Scheduler could not be more than 1440 minutes (24 hours). That is why the approach you have followed would not allow you to create a Timeline Year view. To do so, you will need to create an entirely new view in the Scheduler. If you need further assistance on that task, I would recommend you our Professional services. That team is focused on providing tailor made solutions as per customer requirements. Let me know if you are interested in cooperating with our colleagues and I will arrange someone from the team to contact you directly.

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
David
Top achievements
Rank 1
answered on 23 Apr 2019, 08:12 AM
The problem is not only regarding to the max size of the majortick, but there is also a "unit of measure" problem, indeed I would like to set the majortick not in minutes but in months(that is not always equal to 1440x30)...

That said, the answer to yout question is yes, i would like to cooperate with your colleagues...

Thanks so much
0
Veselin Tsvetanov
Telerik team
answered on 23 Apr 2019, 10:42 AM
Hello David,

I have forwarded your contacts to the Professional services team. They will get in touch with you within three business days.

As per the concerned scenario, I have also opened the following feature request in our Feedback portal on your behalf. I would suggest you to cast your vote for it.

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Veselin Tsvetanov
Telerik team
answered on 23 Apr 2019, 10:46 AM
Hello David again,

I would also suggest you to review the Year View of the Gantt widget and check whether that will cover your requirements: https://dojo.telerik.com/IqaJUsoF

Regards,
Veselin Tsvetanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Scheduler
Asked by
David
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
David
Top achievements
Rank 1
Share this question
or