Subscribe - It's FREE!!

Stay Connected Here

Stay Updated With Us Here



Google

How to hide hours in month view of kendo UI Scheduler


Share with WhatsApp


This post helps you to know how to hide hours (timings) and show business hours button in month view of Kendo UI Scheduler.

In one of my project our client wants that in month view he only sees list of event and he is not interested to see them in hourly manner as for him all events are all day event. So while implementing that requirement I found this solution by which you can hide all those hours without any jQuery code.

Hours (Times) in Month View -Kendo UI Sceduler

To hide hours in month view (refer above image) of Kendo UI Scheduler we can use configuration attribute called “MinorTickCount” which we can set while defining view. Though it is not a proper way but for most of the scenarios it can save your time.

To hide hours you need to set this attribute value to 0(Zero) like following.

views.DayView(d => MinorTickCount(0));

For more information about this configuration attribute you can check telerik docs here . In docs “MinorTickCount” attribute has description as “The number of time slots to display per major tick”

“Show Business Hours”  button comes in footer of the day view like below.

Show Business Hours Button - Kendo UI Sceduler

To hide this “Show Business Hours” button together with hours you can set footer to false like below.

.Views(views =>
{

views.DayView(d => d.Footer(false).ShowWorkHours(false).MinorTickCount(0));

})

You can achieve the same effect by using jQuery & css code like below.

To make event’s width to 100 percent

.k-scheduler-dayview .k-event
{
        width: 100% !important;
}

And to hide hours add following code in DataBound event of Kendo Scheduler.

if (e.sender.view().name.toLowerCase() == "day") {

            $('.k-scheduler-times').hide();

            $('.k-scheduler-dayview .k-scheduler-content .k-scheduler-table').hide();

 }

Hope above code will save some of your time. Let me know if you know better way than this and also share kendo related your findings in comment section or by mail to help developers like us. Thanks.



If you enjoyed this post take 5 seconds to share it! Be Socialable. :-)

Share with WhatsApp

Posts To Read Next

Kendo Web Extensions for ASP.NET MVC -Grid Control - jQuery Code for mostly used functionality

Kendo UI Grid for MVC is one of the mostly used control by developers. In this post I am going to share some jQuery code which can be helpful to all other developers.


Top 10 Visual Studio things which can boost developers coding speed

Visual Studio 2012 provides some coding features by which you can code faster if use them properly. This post will cover top 10 things among them to boost your development speed.


Visual Studio 2008 Shell and TFS integration

Visual Studio 2008 Shell and TFS integration is the problem for all newbies of BIDS and TFS. Here is the solution.


How to call click or any event only once in jQuery

Know how to execute an click event or any event only once for any element in jQuery. Perform action only once and even not required to unbind event.


Assembla - Free and private repository to manage your source code online with SVN subversion hosting

With Assembla you can share source code with others online. Free & Private source code repository with SVN Subversion, Git & Perforce Hosting.


Your opinion is valuable for us! Comments, suggetions are welcome.


Submit your Email Id to stay updated with us and get notified with our new posts. It's FREE!
We know this popup is disturbing you!
But We would greatly appreciate if you share us with your friends below!

It will not take more than 2 seconds but will motivate us greatly to write more,share more!

x