Adding onChange Event to DatePicker

2 posts, 0 answers
  1. Dave
    Dave avatar
    1 posts
    Member since:
    May 2015

    Posted 02 Mar 2016 Link to this post

    I'm trying to add an onChange event to the Kendo DatePicker and noticed that there is not an easy way to go about doing this, I unfortunately. 

    I was able to add an override by using jQuery but I can only get this to work if I know the name of the datepicker. I'm providing an example of this below for reference. 

    <!-- [ begin ] invoke onChange event -->

    <script type="text/javascript">
        $(document).ready(function () {
            function onChanger() {
                alert("Change :: " + kendo.toString(this.value(), 'd')); // show the value

                document.forms['submitForm'].submit(); // submit the form

                change: onChanger

    <input id="datepicker" name="datepickers" />

    <!-- [ end ] invoke onChange event -->

    My problem is I'm looping through items which dynamically are building these datepickers.

    So my code looks like this:


                                                              .Name("AllTeachersObjectives_" + rec.CalendarGroupID)
                                                              .Events(e => e.Change("startChange"))


    How can I dynamically invoke the onChange event from using a name of a datePicker that is dynamic?

    Any help would be greatly appreciated!! 


    - Dave




  2. Helen
    Helen avatar
    1052 posts

    Posted 07 Mar 2016 Link to this post

    Hi Dave,

    You may try the following:

    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top