Edit this page

Submit Forms on Enter

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

Example
    <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.

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy