Book Image

Learning Kendo UI Web Development

By : John Adams
Book Image

Learning Kendo UI Web Development

By: John Adams

Overview of this book

<p>Creating useful and attractive web sites for today’s audiences requires more JavaScript programming than ever before. JavaScript, however, isn’t easy and staying up to date with recent trends makes it even harder. You need a way to integrate the latest technology into your web site without having to start from the beginning.</p> <p>"Learning Kendo UI Web Development" shows you how to add the latest web features to your site without doing all of the work yourself. The experts at Telerik have created a fully supported code library that lets you focus on what makes your sites special while letting them focus on how that translates into cutting edge JavaScript code.</p> <p>This book will take you on a survey through Kendo UI for the web from the basic widgets that wrap input fields to the full page scaffolding widgets for setting up your site.</p> <p>Kendo UI for the web is a rich framework of JavaScript widgets and tools that will add immediate value to your web sites. Learn the full spectrum of what Kendo UI has to offer in specialized widgets that gather input from users by displaying calendars, sliders, or date pickers all the way up to widgets that structure your web pages through data-driven models in accordions, tabs, list views, and tree views.</p> <p>"Learning Kendo UI Web Development" is the perfect companion for navigating the broad features offered by Telerik in JavaScript web development.</p>
Table of Contents (18 chapters)
Learning Kendo UI Web Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
9
Implementing the Splitter and TreeView Widgets
Index

Events fired by the Calendar widget


The Kendo UI calendar widget has two events—change and navigate. These events fire when the action after which they are named occurs. The Change fires when the selected date is changed, navigate fires when the calendar is navigated—such as when the month is changed or the view is moved up from "month" to "year".

What if you wanted the calendar to only appear when a user selected a certain input box on a page, and then place its value into that input element? You could try something like this. Modify the final script block of the page that we are working on to look like this example:

<script type="text/javascript">
    $(function () {
        $("#mvcCalendar").hide();
    });
    $(document).ready(function () {
        $("#mvcCalendar").data("kendoCalendar").bind("change", function (e) {
            var date = $("#mvcCalendar").data("kendoCalendar").value();
            $("#showTheCalendar").val(kendo.toString(date, 'd'));
        });
    });
    $...