New to Kendo UI for jQuery? Download free 30-day trial

Integrate DatePicker with DateJS Library

The following example demonstrates how to integrate the DatePicker with DateJS and use its syntactic sugar.

    <div id="email-settings">
        <div class="display-picker">
            <input id="datepicker" placeholder="type 'next friday'" style="width:150px;" />
        <div class="archive-picker">
            <input id="monthpicker" value="November 2011" style="width:150px" />
        <p>Integration with the <a target="_blank" href="">DateJS</a> library</p>
    <script src=""></script>
        $(document).ready(function() {
            // create DatePicker from input HTML element

                // defines the start view
                start: "year",

                // defines when the calendar should return date
                depth: "year",

                // display month and year in the input
                format: "MMMM yyyy"

            //Parse input value on blur using DateJS
            $("[data-role=datepicker]").on("blur", function() {
                var element = $(this);
                var widget ="kendoDatePicker");

                if (element.val()) {

See Also

For more runnable examples on the Kendo UI DatePicker, browse its How To documentation folder.

In this article
Not finding the help you need? Improve this article