Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear Button Does Not Trigger Change Event #7997

Open
PMcDonough11 opened this issue Oct 4, 2024 · 0 comments
Open

Clear Button Does Not Trigger Change Event #7997

PMcDonough11 opened this issue Oct 4, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@PMcDonough11
Copy link
Contributor

Bug report

When clearing the contents of part of a Kendo UI DateRangePicker with a clear button, the change event does not trigger.

Reproduction of the problem

  1. Go to this Progress Kendo UI Dojo.
  2. Add dates to start and end inputs - Change event fires as shown in console.
  3. Clear them with the clearbutton - Change event does not fire.

Expected/desired behavior

The Change event should fire when clear button is pressed.

Workaround

Subscribing to a mousedown event on the clear button, and manually triggering the change event. It will require a setTimeout due to timing purposes:

      //Mousedown event on clear button
      $("span.k-clear-value").on("mousedown", function(e){

        //set timeout for timing purposes
        setTimeout(function(){

          //reference DateRangerPicker and trigger Change event
          var dateRange = $("#daterangepicker").data("kendoDateRangePicker");
          dateRange.trigger("change");
        }, 200);
      });

Environment

@github-actions github-actions bot added the FP: Unplanned Sync status with associated Feedback Item label Oct 4, 2024
@alestoya alestoya self-assigned this Oct 7, 2024
@alestoya alestoya added this to the 2024 Q4 (Nov) milestone Oct 7, 2024
@github-actions github-actions bot added FP: Planned Sync status with associated Feedback Item and removed FP: Unplanned Sync status with associated Feedback Item labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants