Submit Forms on Enter

The following example demonstrates how to submit a form when the Enter key is pressed by the user.

    <form id="form1" style="border: 1px solid red">
        <input id="datepicker" />
        <button>Submit</button>
    </form>

    <script>
        $(function() {
          var form = $("#form1");

          $("#datepicker").kendoDatePicker();

          form.on("submit", function(e) {
            e.preventDefault();
                alert("submit!");    
          });
        });
    </script>

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