admin管理员组

文章数量:1327476

I'm trying to hide times header from a Kendo UI Scheduler widget but until now, I didn't achieved the results I need in my choosen type of view. I don't need times because all my events are all day events. Therefore, is there any way of not showing times such as 12:00 AM, 13:00 AM, etc...

I followed the documentation and if I put it in my script, the Scheduler doesn't show up anymore. Here're the scripts:

dataBinding: function(e) {
            var view = this.view();

            view.times.hide();
            view.timesHeader.hide();
        },

and/or

dataBound: function(e) {
            var tables = $(".k-scheduler-times .k-scheduler-table");

            //Required: remove only last table in dataBound when grouped
            tables = tables.last();

            var rows = tables.find("tr");

            rows.each(function() {
              $(this).children("th:last").hide();
            });
        },

Then, as an other alternative, I simply added this line of script into the views section:

minorTickCount: 0

All the rows with the 12:00 AM disappeared however, that made my Schedule plete obsolete because it erased all the cells of where events are showed.

Anyone ever encountered such an issue to overe?

I'm trying to hide times header from a Kendo UI Scheduler widget but until now, I didn't achieved the results I need in my choosen type of view. I don't need times because all my events are all day events. Therefore, is there any way of not showing times such as 12:00 AM, 13:00 AM, etc...

I followed the documentation and if I put it in my script, the Scheduler doesn't show up anymore. Here're the scripts:

dataBinding: function(e) {
            var view = this.view();

            view.times.hide();
            view.timesHeader.hide();
        },

and/or

dataBound: function(e) {
            var tables = $(".k-scheduler-times .k-scheduler-table");

            //Required: remove only last table in dataBound when grouped
            tables = tables.last();

            var rows = tables.find("tr");

            rows.each(function() {
              $(this).children("th:last").hide();
            });
        },

Then, as an other alternative, I simply added this line of script into the views section:

minorTickCount: 0

All the rows with the 12:00 AM disappeared however, that made my Schedule plete obsolete because it erased all the cells of where events are showed.

Anyone ever encountered such an issue to overe?

Share Improve this question edited Jul 15, 2015 at 11:37 samureira asked Jul 14, 2015 at 11:20 samureirasamureira 2632 silver badges17 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 9

You could try this css:

.k-scheduler-timelineWeekview > tbody > tr:nth-child(1) .k-scheduler-table tr:nth-child(2) {
    display: none;
}

In my case the problem was fixed with the following code:

 dataBound: function(e) {
   var view = this.view();
   view.datesHeader.find("tr:last").prev().hide();
   view.timesHeader.find("tr:last").prev().hide();
 }

本文标签: javascriptHow to hide times header of a timelineMonth view on Kendo UI Scheduler widgetStack Overflow