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

possible to make Kendo calendar act like a "full sized wall calendar" -- as big as the browser window?

5 Answers 635 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Tim R
Top achievements
Rank 1
Tim R asked on 28 Jan 2013, 07:20 PM
My users would like a full-screen calendar-view, with cells capacious enough to display short blurbs of text, rather like a personal wall-calendar. It would occupy 100% of its container div, like a grid, so it could grow as wide as the browser window. Is it possible for the developer to modify the Kendo calendar to behave like this, or would it be better to search for such a dedicated widget?

5 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 29 Jan 2013, 02:55 PM
Hello Tim,

This effect is not supported out of the box, however you can achieve it by overriding the corresponding CSS rules. Please check this example: http://jsbin.com/ihuguw/2/edit

You may adjust the size of widget (.k-widget.k-calendar) and its cells (.k-content tbody td) according to your specific requirements.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Tim R
Top achievements
Rank 1
answered on 29 Jan 2013, 11:36 PM
Excellent. Thanks very much for the sample, Alexander.
0
Tim R
Top achievements
Rank 1
answered on 16 Feb 2013, 02:32 PM
I haven't been able to figure out how to make the calendar stretch to 100% of the browser window height, although the calendar does expand to make use of the width.  Would be grateful for advice on how to do that. 
Thanks

EDIT:
#calendar table {height: 90%, width: 100%}

accomplishes this vertical stretch in Chrome and Opera and Firefox but not in IE9.
0
Tim R
Top achievements
Rank 1
answered on 16 Feb 2013, 03:17 PM
Also, how to prevent the calendar from displaying an extra week at the bottom from the next month?  Even if max is set to the 28th day of February, for example, the grid displays through March 9th.

    var CAL = $("#calendar").data("kendoCalendar");
    CAL.min = new Date("2013/02/01");
    CAL.max = new Date("2013/02/28")

EDIT: This kludge seems to be working --
function deleteFinalRow() {  
    var deleteRowFlag = true;  
        $("#calendar tbody tr:last").children("td").each(function (cellIndex, cellElem) {               
            if ( $(cellElem).hasClass("k-other-month")===false) { 
                deleteRowFlag = false;
            }
        });
        if (deleteRowFlag) {         
            $("#calendar tbody tr:last").remove();
        }   
}
0
Alexander Valchev
Telerik team
answered on 20 Feb 2013, 08:55 AM
Hi Tim,

In order to stretch the calendar to 100% of the browser window you should  stretch the html and body elements.
body, html {
    margin:0;  
    height:100%;
    width:100%;
}
.k-widget.k-calendar {
    width: 100%;
    height: 100%;
}
.k-widget.k-calendar .k-content tbody td {
    width: 75px;
    height: 90px;
}

Regarding min/max dates, the syntax you used is incorrect. You have to set those value in the configuration of the widget or to use the respective methods. Please check the following documentation:

All the best,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Calendar
Asked by
Tim R
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Tim R
Top achievements
Rank 1
Share this question
or